Portable electronic apparatus, operation control method, operation control program, signal generation apparatus and signal generation method

ABSTRACT

A portable electronic apparatus includes an acceleration detection unit, an evaluation-signal generation unit, and a control unit. The acceleration detection unit is configured to detect an acceleration generated in the portable electronic apparatus. The evaluation-signal generation unit is configured to carry out a predetermined process based on the acceleration detected by the acceleration detection unit in order to generate an evaluation signal representing the amplitude and positive or negative polarity of the acceleration. The control unit is configured to produce a result of determination as to whether or not the portable electronic apparatus has been driven to make a predetermined movement on the basis of the evaluation signal and carrying out a predetermined operation on the basis of the result of determination.

CROSS REFERENCES TO RELATED APPLICATIONS

The present invention contains subject matter related to Japanese PatentApplication JP 2006-204776 filed with the Japan Patent Office on Jul.27, 2006, the entire contents of which being incorporated herein byreference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a portable electronic apparatus, anoperation control method adopted by the portable electronic apparatusand an operation control program implementing the operation controlmethod. More particularly, the present invention relates to a portableelectronic apparatus having an acceleration detection unit configured todetect an acceleration, an operation control method usable in theportable electronic apparatus and an operation control programimplementing the operation control method. In addition, the presentinvention also relates to an evaluation-signal generation apparatus forgenerating an evaluation signal on the basis of an acceleration detectedby the acceleration detection unit as a signal optimum for detection ofa predetermined movement of the portable electronic apparatus andrelates to a signal generation method adopted by the evaluation-signalgeneration apparatus.

2. Description of the Related Art

The reader is suggested to refer to Japanese Patent Laid-open No.2006-17874 used as Patent Document 1 and Japanese Patent Laid-open No.Hei 2-69693 used as Patent Document 2.

In some cases, the number of operation components that can be employedin an electronic apparatus or, in particular, a portable electronicapparatus, is deliberately limited due to reasons such as a small-sizerequirement for improving the portability of the apparatus and a designrequirement of the apparatus. For example, some portable music playersor the like employ only basic-operation components such as playback,stop and volume-adjustment buttons. In the case of such a portableelectronic apparatus, the user carries out operations other than thebasic operations by typically making use of a menu appearing on adisplay screen of the apparatus. In this way, the portable electronicapparatus allows the user to carry out operations other than the basicoperations while having a compact size and an improved design. If theuser has to carry out a specific operation other than the basicoperations on the portable electronic apparatus by making use of a menuappearing on a display screen of the apparatus, however, the user mayhave to go through a number of hierarchical menu layers till the userreaches a desired menu item representing the specific operation. Thus,the designer of the portable electronic apparatus has to consider fearof the deteriorated operatability of the apparatus.

On the other hand, some portable electronic apparatus designed in recentyears employ an interface for detecting an operation carried out by theuser by making use of an acceleration sensor. For example, PatentDocument 1 describes a portable electronic apparatus capable ofdetecting a movement caused by the user as a movement of the apparatuson the basis of a signal generated by an acceleration sensor employed inthe apparatus and issuing a predetermined instruction on the basis of aresult of the detection (an example of the movement caused by the useris a movement caused by hand shaking or hand striking). On the otherhand, Patent Document 2 describes a portable electronic apparatuscapable of detecting a movement caused by the user as a movement of theapparatus on the basis of a signal generated by an acceleration sensoremployed in the apparatus in the same way as the apparatus disclosed inPatent Document 1 and changing the mode of a clock on the basis of aresult of the detection. Since the portable electronic apparatus iscapable of detecting a movement caused by the user as a movement of theapparatus on the basis of a signal generated by an acceleration sensoremployed in the apparatus as described above, the number of operationcomponents to be provided in the apparatus can be reduced by a quantityaccording to the capability.

SUMMARY OF THE INVENTION

By the way, in the existing technologies described in Patent Documents 1and 2, a result of comparing the amplitude of an acceleration with athreshold value determined in advance is used to produce a result ofdetermination as to whether or not the body of an apparatus has made apredetermined movement. With this movement detection technique, however,it is feared that an incorrect result of determination is produced insome cases. That is to say, it is necessary to consider cases in whichthe portable electronic apparatus is used by a walking user or a runninguser. In addition, it is also necessary to assume that the portableelectronic apparatus is carried by the user by hanging the apparatusfrom a strap or putting the apparatus in a back pack. In such cases, itis quite within the bounds of possibility that the acceleration sensorundesirably generates an acceleration signal having an amplitudeequivalent to the amplitude of an acceleration signal, which isgenerated when the user actually takes an action by shaking or hittingthe portable electronic apparatus as described above. Thus, by merelycomparing the amplitude of an acceleration with a threshold valuedetermined in advance in order to produce a result of determination asto whether or not the body of an apparatus has made a predeterminedmovement, there is higher probability that an incorrect result ofdetermination is produced.

Addressing the problems described above, inventors of the presentinvention have innovated a portable electronic apparatus including:

an acceleration detection unit configured to detect an accelerationgenerated in the portable electronic apparatus;

an evaluation-signal generation unit configured to carry out apredetermined process based on the acceleration detected by theacceleration detection unit in order to generate an evaluation signalrepresenting the amplitude and positive or negative polarity of theacceleration; and

a control unit configured to produce a result of determination as towhether or not the portable electronic apparatus has been driven to makea predetermined movement on the basis of the evaluation signal generatedby the evaluation-signal generation unit and carrying out apredetermined operation on the basis of the result of determination.

In addition, the inventors also innovated an evaluation-signalgeneration apparatus for generating an evaluation signal by:

computing the absolute value of a present acceleration detected at thepresent point of time by an acceleration detection unit for detecting anacceleration;

finding an average of absolute values each computed as the absolutevalue of an acceleration detected by the acceleration detection unit atone of points of time in a predetermined period of time in the past; and

subtracting the average from the absolute value of the presentacceleration in order to give a value of the evaluation signal at thepresent point of time.

In accordance with the present invention, the evaluation-signalgeneration unit is capable of carrying out a predetermined process basedon the acceleration detected by the acceleration detection unit in orderto generate an evaluation signal representing the amplitude and positiveor negative polarity of the acceleration. In accordance with theportable electronic apparatus provided by the present invention, thecontrol unit employed in the portable electronic apparatus is capable ofproducing a result of determination as to whether or not the portableelectronic apparatus has been driven to make a predetermined movement onthe basis of the evaluation signal generated by the evaluation-signalgeneration unit as a signal representing not only the amplitude of theacceleration, but also the positive or negative polarity of theacceleration. Thus, the control unit is capable of properly producing aresult of determination as to whether or not the portable electronicapparatus has been driven to make a predetermined movement includingback-and-forth motions due to an operation such as particularly ashaking operation carried out on the portable electronic apparatus. As aresult, it is possible to produce a result of determination as towhether or not the portable electronic apparatus has made apredetermined movement more accurately than the existing technology ofmerely comparing the amplitude of an acceleration with a threshold valuedetermined in advance.

In a process to produce a result of determination as to whether or notthe body of an apparatus has made a predetermined movement, (that is,whether or not the user has carried out an operation determined inadvance, on the basis of an acceleration signal generated by theacceleration detection unit in accordance with the present invention asdescribed above), the precision of the determination can be made betterthan the existing technology and the probability that an incorrectresult of determination is produced can be reduced substantially.

BRIEF DESCRIPTION OF THE DRAWINGS

These and other features of the present invention will become clear fromthe following description of the preferred embodiments given withreference to the accompanying diagrams, in which:

FIG. 1 is a perspective diagram showing a typical external appearance ofa portable electronic apparatus according to an embodiment of thepresent invention;

FIG. 2 is a block diagram showing a typical internal configuration ofthe portable electronic apparatus according to the embodiment of thepresent invention;

FIG. 3 is an explanatory diagram to be referred to in description of ashake operation;

FIG. 4A is a diagram showing the waveforms of acceleration signals eachoutput by an acceleration sensor employed in the portable electronicapparatus;

FIG. 4B is a diagram showing the waveform of an evaluation signal as awaveform to be compared with the waveforms of the acceleration signals;

FIG. 5A is a diagram showing the waveforms of acceleration signals geach output in a shake operation;

FIG. 5B is a diagram showing the waveform of an evaluation signal Joutput in a shake operation;

FIG. 5C is a diagram showing the waveform of an evaluation signal scomputed on the basis of areas beneath the waveforms of the accelerationsignals g in a shake operation;

FIG. 6A is a diagram showing the waveforms of acceleration signals geach output while the portable electronic apparatus is being carried bythe user by being inserted into a back pack;

FIG. 6B is a diagram showing the waveform of an evaluation signal Joutput while the portable electronic apparatus is being carried by theuser by being inserted into a back pack;

FIG. 6C is a diagram showing the waveform of an evaluation signal scomputed on the basis of areas beneath the waveforms of the accelerationsignals g while the portable electronic apparatus is being carried bythe user by being inserted into a back pack;

FIG. 7A is a diagram showing the waveforms of acceleration signals geach output while the portable electronic apparatus is being carried bythe user by hanging the apparatus from a strap;

FIG. 7B is a diagram showing the waveform of an evaluation signal Joutput while the portable electronic apparatus is being carried by theuser by hanging the apparatus from a strap;

FIG. 7C is a diagram showing the waveform of an evaluation signal scomputed on the basis of areas beneath the waveforms of the accelerationsignals g while the portable electronic apparatus is being carried bythe user by hanging the apparatus from a strap;

FIG. 8 is an explanatory diagram to be referred to in description of anoperation to be carried out for a shake-count value equal to 0 in aprocess to detect a shake operation in accordance with the embodiment;

FIG. 9 is an explanatory diagram to be referred to in description of anoperation to be carried out for the shake-count value at least equal to1 in a process to detect a shake operation in accordance with theembodiment;

FIG. 10 is an explanatory diagram to be referred to in description ofdeferment processing to be carried out as a process to detect a shakeoperation in accordance with the embodiment;

FIG. 11A is a diagram showing a typical waveform of the evaluationsignal J output in a shake operation;

FIG. 11B is a diagram showing shake-count value changes accompanying thewaveform shown in FIG. 11A;

FIG. 12 shows a flowchart exhibiting the flow of processing carried outto generate an evaluation signal J on the basis of an accelerationsignal as a particular part of processing to detect a shake operation inaccordance with the embodiment;

FIG. 13 shows a flowchart exhibiting the flow of processing carried outto obtain information on a count value representing a result of countingcarried out during a period between 0 crosses as a particular part ofprocessing to detect a shake operation in accordance with theembodiment;

FIG. 14 shows a flowchart exhibiting the flow of processing carried outto obtain information on a peak value and the timing of the peak valueas a particular part of processing to detect a shake operation inaccordance with the embodiment;

FIG. 15 shows a flowchart exhibiting the flow of processing carried outto produce a variety of determination results for determining a shakeoperation as a particular part of processing to detect a shake operationin accordance with the embodiment;

FIG. 16 shows a flowchart exhibiting the flow of processing to becarried out as follow-up processing upon detection of a shake operation;

FIG. 17 is an explanatory diagram to be referred to in description ofoperations carried out in accordance with a modified version of theembodiment;

FIG. 18 shows a flowchart exhibiting the flow of processing carried outto set a present-mountain invalidity flag as a particular part ofprocessing to detect a shake operation in accordance with the modifiedversion of the embodiment; and

FIG. 19 shows a flowchart exhibiting the flow of processing carried outto produce a determination result on the basis of the present-mountaininvalidity flag as a particular part of processing to detect a shakeoperation in accordance with the modified version of the embodiment.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

A preferred embodiment of the present invention is explained below byreferring to diagrams (in the following description, the preferredembodiment of the present invention is referred to simply as anembodiment).

[External Appearance]

FIG. 1 is a perspective diagram showing a typical external appearance ofa portable content player 1 serving as a portable electronic apparatusaccording to an embodiment of the present invention. The portablecontent player 1 according to the embodiment has such a small size thatthe user is capable of carrying the player by for example making use ofone hand so that the portable content player 1 can be utilized as aportable apparatus. As is obvious from the figure, the externalappearance is the appearance of an approximately rectangular shape,which has six faces.

On one of the six external faces of such a portable content player 1, adisplay screen unit 10A is provided as shown in the figure. The displayscreen unit 10 a is a unit for displaying necessary informationaccording to the operation state of the portable content player 1. Whenthe portable content player 1 is reproducing a content, for example, thedisplay screen unit 10A displays the title of the content beingreproduced and necessary information including primary representativessuch as the reproduction lapse time in terms of characters and images.

In addition, the portable content player 1 also employs operationcomponents to be operated physically by the user in order to givecommands to the portable content player 1. The user operates theoperation components by, for example, pressing or rotating thecomponents. The operation components include key buttons 8 b and 8 cprovided on the same face as the display screen unit 10A as well as ajog dial 8 a attached to a face approximately perpendicular to the faceon which the display screen unit 10A is provided. The jog dial 8 a canbe rotated typically over an angular range determined in advance inclockwise and counterclockwise directions indicated by a bent arrow Ashown in the figure. In addition, the jog dial 8 a can also be pushedtoward the body of the portable content player 1 in an inward directionindicated by an arrow B shown in the figure or pulled out from the bodyof the portable content player 1 in an outward direction indicated bythe same arrow B. In general, the key buttons 8 b and 8 c can be pushedand released. In the case of the portable content player 1 according tothe embodiment, by operating these operation components, the user iscapable of carrying out almost all operations to reproduce a contentfrom the portable content player 1. As will be described later, however,the user is also capable of carrying out a special operation by shakingthe portable content player 1 by using a hand without operating theseoperation components.

In addition, a headphone terminal 7 is provided on the inner side of thejog dial 8 a. The sound of a content reproduced by the portable contentplayer 1 is output by way of the headphone terminal 7.

[Internal Configuration of the Portable Electronic Apparatus]

FIG. 2 is a block diagram showing a typical internal configuration ofthe portable content player 1 shown in FIG. 1. First of all, the controlunit 2 has a microcomputer typically including a CPU (Central ProcessingUnit), a ROM (Read Only Memory) and a RAM (Random Access Memory) or thelike. The control unit 2 is a unit for executing various kinds ofcontrol on the portable content player 1.

The nonvolatile memory unit 3 is a member for storing information. Ingeneral, the nonvolatile memory unit 3 is a semiconductor memory devicecapable of retaining the information stored therein even if no power issupplied thereto by a main power supply. Main examples of thenonvolatile memory unit 3 include a flash memory. In the case of theembodiment, information stored in the nonvolatile memory unit 3 includesa shake-operation detection program 3 a and a control program 3 b asshown in the figure. The shake-operation detection program 3 a and thecontrol program 3 b are each a program to be executed by the CPUemployed in the control unit 2. Details of the shake-operation detectionprogram 3 a and the control program 3 b will be described later. It isto be noted that, even though the figure shows only the shake-operationdetection program 3 a and the control program 3 b, which are each storedin the nonvolatile memory unit 3 as a program to be executed by the CPUemployed in the control unit 2, as information stored in the nonvolatilememory unit 3, the nonvolatile memory unit 3 can also be used forstoring other information such as various kinds of data. For example,the nonvolatile memory unit 3 can conceivably be used for storing, amongothers, set data to be used by the control unit 2 in execution ofvarious kinds of control and management information.

The content storage unit 4 is a section for storing contents that caneach be reproduced by the portable content player 1. The contents storedin advance in the content storage unit 4 are managed in file units. Thepresent invention should not specially impose limitations on types ofthe contents stored in advance in the content storage unit 4 or theformat of files each used as a unit for managing the contents. In orderto simplify the explanation in the following description, however, thecontents each stored in advance in the content storage unit 4 as anobject of reproduction are each audio data (or musical data), which hasbeen compressed in accordance a compression coding format determined inadvance.

In addition, a storage medium employed in the portable content player 1as the content storage unit 4 is not specially limited to a specificstorage medium. That is to say, the content storage unit 4 can be anyarbitrary storage medium as long as the actually used storage medium isa widely used contemporary medium such as an HDD (Hard Disk Drive) or anonvolatile semiconductor memory device (such as a flash memory). Inother words, the content storage unit 4 can be a storage medium known sofar or being developed as a future medium. In addition, the portablecontent player 1 can have a configuration in which the content storageunit 4 is a storage medium embedded in the portable content player 1 asshown in the figure or a configuration in which a removable storagemedium is used as the content storage unit 4. If a removable storagemedium is used as the content storage unit 4, the portable contentplayer 1 is provided with a drive for driving the removable storagemedium. In addition, even though the nonvolatile memory unit 3 and thecontent storage unit 4 are employed in the portable content player 1 asfunctional blocks separated from each other as shown in FIG. 2, it isalso possible to provide a configuration in which the nonvolatile memoryunit 3 and the content storage unit 4 are physically combined into acommon storage medium.

The external data interface 11 employed in the portable content player 1according to the embodiment is a section for acquiring a content to bestored in advance in the content storage unit 4 from an external contentsource such as a personal computer serving as a host. That is to say,the portable content player 1 is connected to the host personal computerthrough the external data interface 11 so as to allow a content to betransferred from the personal computer to the portable content player 1.The portable content player 1 acquires the content from the personalcomputer in accordance with control executed by the control unit 2 andstores the acquired content in the content storage unit 4.

Each content acquired from an external content source can be put in aproper group in accordance with additional information attached to thecontent. For example, a content is handled in the external contentsource by including the content in an album. Contents pertaining to thesame album each have the title of the album as additional informationattached to each of the contents. In this case, the portable contentplayer 1 stores such contents in the content storage unit 4 and puts thecontents in a group corresponding to the album for the purpose ofmanaging the contents. As another example, an external content sourcemay generate a playlist serving as a list of selected contents. In thiscase, the portable content player 1 stores such contents in the contentstorage unit 4 and puts the contents in a group corresponding to theplaylist. When the portable content player 1 receives a content from anexternal content source, the portable content player 1 puts the contentin such a group, which can correspond to additional information or thelike. In the following description, a group in which the portablecontent player 1 puts contents for the purpose of managing the contentsis referred to as a folder.

The external data interface 11 has a configuration including hardwareand software for carrying out communications with an external devicethrough either of a cable and radio communication, which conform to apredetermined data communication standard. The data communicationstandard adopted by the portable content player 1 as a standard to whichthe cable or the radio communication conforms should not be prescribedspecially. In the present state of the art, however, it is possible toconceivably adopt a data communication standard such as the IEEE(Institute of Electrical and Electronic Engineers) 1394, the USB(Universal Serial Bus), the Ethernet, the Bluetooth or theIEEE802.11a/b/g.

The reproduction processing unit 5 is a section for inputting a contentread out from the content storage unit 4 and carrying out a necessaryreproduction signal process on the content in accordance with controlexecuted by the control unit 2. Since the content is a file of audiodata completing a compression coding process according to a methoddetermined in advance, the reproduction processing unit 5 carries out ademodulation process or the like according to the compression codingmethod an other processes on the content, and outputs the result of thereproduction signal process to the audio-output processing unit 6 as anaudio signal. The audio-output processing unit 6 is a section forcarrying out audio-signal processing, that has to be executed at a stagefollowing the demodulation process, on the audio signal received fromthe reproduction processing unit 5. The audio-signal processingtypically includes a process to adjust the quality of the sound, aprocess to adjust the volume of the sound and a process to amplify theaudio signal. As a result of the audio-signal processing, theaudio-output processing unit 6 outputs an audio signal for driving aheadphone to the headphone terminal 7.

The display unit 10 is a display device having the display screen unit10A included in the external appearance shown in FIG. 1 as theappearance of the portable content player 1. The display unit 10displays various kinds of information on the display screen unit 10A. Inan operation carried out by the display unit 10 to display an image onthe display screen unit 10A, the control unit 2 stores the data of theimage on the display memory 9 and controls the display unit 10 to carryout a display driving operation making use of the data stored in thedisplay memory 9.

The operation unit 8 employs operation components and another member.Provided on outer faces of a case enclosing the portable content player1, the operation components are the jog dial 8 a and key buttons 8 b and8 c. The other member is a unit for generating an operation commandsignal according to an operation carried out on any one of the operationcomponents and outputting the operation command signal to the controlunit 2. The control unit 2 carries out a necessary process according tothe operation command signal received from the operation unit 8.

The acceleration sensor 12 is a sensing unit employed in the portablecontent player 1 according to the embodiment. The acceleration sensor 12is a sensor capable of detecting accelerations generated in thedirections of Y and Z axes of a coordinate system based on an X axis,the Y axis perpendicular to the X axis and the Z axis perpendicular to aplane on which both the X and Y axes are laid.

In the case of the embodiment, with the surface of the display screenunit 10A of the portable content player 1 taken as a reference, thethree axes of the X, Y and Z axes are fixed axes as shown in FIG. 1. Asshown in the figure, the Z axis is an axis perpendicular to the surfaceof the display screen unit 10A. On the other hand, the X axis is an axisperpendicular to a face on which the jog dial 8 a is provided (that is,the face on which the jog dial 8 a is provided is a face perpendicularto the surface of the display screen unit 10A). The Y axis is an axisperpendicular to a plane on which both the Z and X axes are laid.

Let us refer back to FIG. 2. The acceleration sensor 12 supplies asignal representing a result of detecting an acceleration generated inthe direction of the Y axis and a signal representing a result ofdetecting an acceleration generated in the direction of the Z axis tothe CPU employed in the control unit 2. In the following description,the a signal representing a result of detecting an accelerationgenerated in the direction of the Y axis is referred to as a Y-axisacceleration signal whereas the a signal representing a result ofdetecting an acceleration generated in the direction of the Z axis isreferred to as a Z-axis acceleration signal.

The control unit 2 samples the Y-axis acceleration signal and the Z-axisacceleration signal, which are generated by the acceleration sensor 12,making use of the sampled signals in a process to be described later asa process to detect a shake operation.

[Shake Operation]

In the portable content player 1 according to the embodiment having theconfiguration described above, in addition to the ordinary operationscarried out on the operation unit 8 serving as operation components, ashake operation to shake the portable content player 1 can be carriedout deliberately by the user without performing the ordinary operationson the operation unit 8. The shake operation is carried out by the userin order to drive the portable content player 1 to perform predeterminedoperations. The shake operation used in the following description isdefined as an operation to shake the portable content player 1 in orderto drive the portable content player 1 to carry out predeterminedoperations.

FIG. 3 is an explanatory diagram to be referred to in description of atypical shake operation defined above. A direction indicated by an arrowG shown in the figure is the gravitational direction whereas a planeperpendicular to the arrow G is a horizontal plane. As shown in thefigure, in order to carry out a shake operation, the portable contentplayer 1 has to be held in an orientation that sets the surface of thedisplay screen unit 10A in parallel to the gravitational direction. Theorientation that sets the surface of the display screen unit 10A inparallel to the gravitational direction is an orientation perpendicularto the horizontal plane. With the portable content player 1 oriented asdescribed above, a shake operation is carried out by shaking theportable content player 1 up and down in the direction of the Y axis asindicated by a double-line arrow shown in the figure. As describedabove, a shake operation is an operation to shake the held portablecontent player 1 in the direction of an axis determined in advance. Toput it more concretely, a shake operation is like an operation to applya hand force to a mercury thermometer instantaneously in order to reseta temperature indicated by the thermometer.

In accordance with such a typical shake operation, the portable contentplayer 1 makes back-and-forth motions in the direction of the Y axis. Toput it concretely, in the shake operation, the portable content player 1moves upward and downward in the gravitational direction and, by movingin both the up and down directions, the portable content player 1 makesback-and-forth motions in the direction of a predetermined axis, whichis the Y axis in this example.

It is to be noted that, even though the typical shake operationdescribed above is a shake operation carried out in the direction of theY axis, in the portable content player 1 according to the embodiment,the acceleration sensor 12 also detects the acceleration of the Z axisas well. As will be described later, the embodiment is made capable ofproducing a result of determination as to whether or not a shakeoperation is being carried out by taking the accelerations made in thedirections of these two axes into consideration. Thus, the shakeoperation can be carried out in not only the direction of the Y axis,but also the direction of the Z axis.

[Generation of an Evaluation Signal]

By the way, if a specific movement is taken into consideration as amovement made by a portable electronic apparatus (for example, impactscorresponding to walking, running, or falling) while the apparatus isbeing used in an attempt to detect a predetermined movement made by theapparatus as a movement different from the specific movement by makinguse of an acceleration sensor as described above, incorrect detection ofthe predetermined movement becomes a problem. In order to avoid such aproblem, the embodiment detects a shake operation by adoption of thefollowing technique.

First of all, in the embodiment, the Y-axis acceleration signal and theZ-axis acceleration signal, which are generated by the accelerationsensor 12, are not used as they are in a process to detect a shakeoperation. Instead, the Y-axis acceleration signal and the Z-axisacceleration signal are subjected to a predetermined process in order togenerate an evaluation signal, which is used for detecting the shakeoperation. A technique adopted by the embodiment to generate anevaluation signal is explained as follows.

As also explained earlier by referring to FIG. 2, first of all, theY-axis acceleration signal and the Z-axis acceleration signal, which aregenerated by the acceleration sensor 12, are supplied to the controlunit 2. The control unit 2 samples the Y-axis acceleration signal andthe Z-axis acceleration signal at intervals determined in advance. Onthe basis of values sampled from the Y-axis acceleration signal and theZ-axis acceleration signal, the control unit 2 generates an evaluationsignal J representing the net amplitude of the acceleration signalsgenerated by the acceleration sensor 12 in the portable content player 1and the net polarity of the acceleration signals. The polarity of anacceleration signal may be a positive or negative polarity.

As a rough concept, the evaluation signal J may be considered as asignal obtained by subtracting an average from a sum. The sum is the sumof the absolute values of values obtained by sampling the Y-axisacceleration signal and the Z-axis acceleration signal for the presentsampling timing. On the other hand, the average is the average value ofsuch sums each obtained with one of a plurality of sampling times in thepast period determined in advance. That is to say, let notation normdenote the sum of the absolute values of values obtained by sampling theY-axis acceleration signal and the Z-axis acceleration signal for thepresent sampling timing whereas notation ag denote the average of suchsums norm each computed with one of sampling timings in the past perioddetermined in advance. In this case, the evaluation signal J isgenerated as a signal satisfying the following equation:J=norm−ag

To put it concretely, the control unit 2 computes the absolute values ofvalues sampled with the present sampling timing from the Y-axisacceleration signal and the Z-axis acceleration signal, which aregenerated by the acceleration sensor 12, are supplied to the controlunit 2. Then, norm is computed by finding the sum of the absolutevalues. By subtracting the average ag from the sum norm, the evaluationsignal J can be found. By the way, ag is the average of such sums eachcomputed with a sampling time in the past period determined in advance.Thus, when the sum norm for the present timing is computed, the sumseach computed for a sampling time in the past period determined inadvance have already been known. The average ag is found by taking anaverage of the sums each computed with a sampling time in the pastperiod determined in advance. Then, the control unit 2 subtracts theaverage ag from the sum norm in order to find an evaluation signal J forthe present timing. The operation to subtract the average ag from thesum norm in order to find an evaluation signal J is carried out withevery timing.

It is to be noted that the absolute value of an original value is avalue representing the absolute quantity of the original value. (In theabove description, the original value is a value sampled from anacceleration signal.) In actuality, the square of an original value maybe used as a substitute for the absolute value of the original value.

FIG. 4A is a diagram showing the waveforms of acceleration signals geach output by an acceleration sensor employed in the portableelectronic apparatus. On the other hand, FIG. 4B is a diagram showingthe waveform of an evaluation signal J as a waveform to be compared withthe waveforms of the acceleration signals. In FIG. 4A, the waveform ofthe Y-axis acceleration signal g is drawn as a solid line whereas thewaveform of the Z-axis acceleration signal g is drawn as a dashed line.As described above, the control unit 2 finds the evaluation signal J bysubtracting an average ag of sums of the absolute values of valuesobtained by sampling the Y-axis acceleration signal and the Z-axisacceleration signal with sampling timings in the past period determinedin advance from the sum norm of the absolute values of values obtainedby sampling the Y-axis acceleration signal g and the Z-axis accelerationsignal g with the present sampling timing. Thus, the evaluation signal Jrepresents the net amplitude of the acceleration signals g generated bythe acceleration sensor 12 in the portable content player 1 and the netpolarity of the acceleration signals g. The polarity of an accelerationsignal may be a positive or negative polarity. (The average ag of sumsof the absolute values can be regarded as an average accelerationsignal.)

FIGS. 5A to 5C are diagrams showing the waveforms of accelerationsignals in a shake operation. FIGS. 6A to 6C are diagrams showing thewaveforms of acceleration signals when the portable electronic apparatusis carried by the user by inserting the apparatus into a back pack.FIGS. 7A to 7C are diagrams showing the waveforms of accelerationsignals each output when the portable electronic apparatus is carried bythe user by hanging the apparatus from a strap. In FIGS. 5A, 6A and 7A,the waveform of the Y-axis acceleration signal g is drawn as a solidline whereas the waveform of the Z-axis acceleration signal g is drawnas a dashed line. The waveform of an evaluation signal s shown in eachof FIGS. 5C, 6C and 7C is a waveform to be compared with the waveform ofan evaluation signal s shown in each of FIGS. 5B, 6B and 7Brespectively. It is to be noted that the waveform area for computing theevaluation signal s shown in each of FIGS. 5C, 6C and 7C is found bycomputing the difference between the present sampled value of anacceleration signal for an axis determined in advance and a sampledvalue immediately leading ahead of the present sampled value and findingthe sum of such differences computed over a predetermined period oftime. (In this case, the axis determined in advance is the Y axis.) Suchan area is found for every sampling timing.

In the first place, as is obvious from FIG. 5, the waveform of theevaluation signal J shown in FIG. 5B represents the amplitudes of theacceleration signals g shown in FIG. 5A as acceleration signalsgenerated in a shake operation. In addition, in the case of a shakeoperation, the waveform of the evaluation signal J exhibits positive andnegative polarities according to positive and negative polaritiesexhibited by the waveforms of the acceleration signals g as polaritiescaused by back-and-forth motions of the shake operation. The waveform ofthe evaluation signal s computed on the basis of areas beneath thewaveforms of the acceleration signals as shown in FIG. 5C also wellfollows the back-and-forth motions of the shake operation. (In the caseof the examples shown in FIG. 5, there are three couples ofback-and-forth motions of the shake operation.)

Also, as is obvious from FIG. 6, the waveform of the evaluation signal Jshown in FIG. 6B represents the amplitudes of the acceleration signals gshown in FIG. 6A as acceleration signals generated when the portableelectronic apparatus is carried by the user by being inserted into aback pack. In comparison with the waveform of the evaluation signal Jshown in FIG. 5B as a signal generated in a shake operation, thewaveform of the evaluation signal J shown in FIG. 6B as a signalexhibiting positive and negative polarities is shifted as a whole in adirection toward one of the polarities by an offset from the 0 levelserving as the center of the polarities. Furthermore, as is obvious fromFIG. 7, on the other hand, the waveform of the evaluation signal J shownin FIG. 7B represents the amplitudes of the acceleration signals g shownin FIG. 7A as acceleration signals generated when the portableelectronic apparatus is carried by the user by being hung from a strap.By the same token, in comparison with the waveform of the evaluationsignal J shown in FIG. 5B as a signal generated in a shake operation,the waveform of the evaluation signal J shown in FIG. 7B as a signalexhibiting positive and negative polarities is shifted as a whole in adirection toward one of the polarities by an offset from the 0 levelserving as the center of the polarities.

As is obvious from experiment results shown in FIGS. 5 to 7, thewaveform of the evaluation signal J according to the embodiment exhibitspositive and negative polarities according to back-and-forth motionsmade by the portable electronic apparatus when a shake operation iscarried out on the portable electronic apparatus. It can be understoodthat the evaluation signal J shown in FIG. 5B is a signal suitable fordetection of a shake operation.

The following explanation confirms what has been described above. Thewaveform of the evaluation signal J according to the present embodimentis a waveform exhibiting positive and negative polarities according topositive and negative polarities exhibited by the waveforms of theacceleration signals g as polarities according to back-and-forth motionsof a shake operation. Thus, the possibility that a shake operation isdetected incorrectly by making use of this evaluation signal J is low incomparison with the use of the evaluation signal s computed on the basisof areas beneath the waveforms of the acceleration signals g as shown inFIG. 5C. That is to say, since the evaluation signal s does not exhibitpositive and negative polarities, it is feared that a shake operation isundesirably detected even though the back-and-forth motions accompanyingthe shake operation are not made normally.

In addition, as described above, the evaluation signal J according tothe embodiment is obtained by subtracting an average ag of sums of theabsolute values of values obtained by sampling the Y-axis accelerationsignal and the Z-axis acceleration signal with sampling timings in thepast period determined in advance from the sum of the absolute values ofvalues obtained by sampling the Y-axis acceleration signal and theZ-axis acceleration signal with the present sampling timing. Thus, theevaluation signal J has a merit that unnecessary offset componentsgenerated in the acceleration signals g can be eliminated. In general,the acceleration sensor 12 for generating the Y-axis acceleration signaland the Z-axis acceleration signal is calibrated typically at the timethe portable content player 1 is shipped from the factory before theportable content player 1 is utilized by the user in the field. Sincethe evaluation signal J has a merit that unnecessary offset componentscan be eliminated, however, the calibration process can be omitted. Inaddition, even if the acceleration sensor 12 is calibrated, more andmore offset components are undesirably superposed on the accelerationsignals g with the lapse of time. Thus, by making use of the evaluationsignal J in detection of a shake operation, incorrect detection of theshake operation can be avoided.

[Shake-Operation Detection Using the Evaluation Signal J]

By referring to FIGS. 8 to 11, the following description explains aconcrete technique for detecting a shake operation by making use of theevaluation signal J. FIG. 8 is an explanatory diagram to be referred toin description of an operation to be carried out for a shake-count valueequal to 0 in a process to detect a shake operation in accordance withthe embodiment. It is to be noted that operations explained by referringto FIGS. 8 to 11 are carried out by the CPU employed in the control unit2. The value of a shake count is a result of a counting operationcarried out by the CPU employed in the control unit 2. As will beobvious from later description, completion of execution of a shakeoperation is confirmed when the shake count reaches a value determinedin advance.

Let us pay attention to a mountain appearing between 0-cross timings ofthe waveform of an evaluation signal J as a mountain of the waveform asshown in FIG. 8 in a process to detect a shake operation. If themountain appearing between 0-cross timings of an evaluation signal J asa mountain of the waveform of the evaluation signal J satisfiesconditions determined in advance, the value of the shake count is set at1 to indicate that a first valid mountain has been detected. Theconditions include condition <1> shown in the figure as a conditionrequiring that the length of a period sandwiched between the 0-crosstimings as the period of the mountain shall be a value in a rangedetermined in advance. To put it in detail, condition <1> may requirethat the length of a period indicated by dashed-line arrows in thefigure as the period of the mountain between the 0-cross timings of theevaluation signal J shall be a value in a range between predeterminedthreshold values zcrs1 and zcrs2 not shown in the figure. (The periodbetween the 0-cross timings corresponds to a 0-cross interval countvalue to be described later.) The conditions also include condition <2>shown in the figure as a condition that the peak value of the mountainshall be a value in the range between threshold values determined inadvance. To put it in detail, condition <2> may require that (theabsolute value of) a maximum value indicated by a solid-line arrow inthe figure as the maximum value of the waveform of the evaluation signalJ formed in the period between the 0-cross timings shall be a value in arange between predetermined threshold values max1 and max2 not shown inthe figure. If the mountain appears between the 0-cross timings of anevaluation signal J as a mountain of the waveform of the evaluationsignal J and satisfies conditions <1> and <2> described above, first ofall, the value of the shake count is set at 1 to indicate that one ofback-and-forth motions accompanying a shake operation has been made.

FIG. 9 is an explanatory diagram to be referred to in description of anoperation to be carried out for the shake-count value at least equalto 1. First of all, even after the value of the shake count is changedfrom 0 to 1 when a first mountain satisfying the conditions describedabove appears as shown in FIG. 8, as shown in FIG. 9, another mountainappearing between the 0-cross timings of an evaluation signal J as amountain of the waveform of the evaluation signal J is examined in orderto produce a result of determination as to whether or not the othermountain satisfies the condition. That is to say, the other mountain isexamined in order to produce a result of determination as to whether ornot the length of the period between the 0-cross timings has a value inthe range sandwiched by the threshold values zcrs1 and zcrs2 determinedin advance and the peak value is a value in the range sandwiched by thethreshold values max1 and max2 determined in advance. In other words,the other mountain is examined in order to produce a result ofdetermination as to whether the mountain is valid or invalid.

A mountain may appear in a period corresponding to a block hatched withslanting parallel lines as shown in FIG. 9. Such a mountain does notsatisfy the conditions described by referring to FIG. 8 and is thusregarded as an invalid mountain, which is ignored for the present. Inthis case, the value of the shake count is sustained at the presentvalue as it is.

Then, when a next mountain satisfying the conditions for a validmountain appears, the next mountain is examined in order to produce aresult of determination as to whether or not the previous mountainsatisfying the conditions and the next mountain are consecutive validmountains appearing in a row. That is to say, the production of theresult of the determination is an attempt to set other conditions that,after the first one of back-and-forth motions caused by a shakeoperation is detected, the other back-and-forth motion following thefirst back-and-forth motion shall be detected.

In other words, while the conditions described above are conditions thata single mountain shall be a valid mountain, the other conditions areconditions that two consecutive mountains shall be valid mountainsappearing in a row. To put it concretely, first of all, successivepositive and negative peak values of the two consecutive mountains shallbe alternately detected and a difference in appearance timing betweenthe positive and negative peak values shall be a value in a rangedetermined in advance as shown in conditions <1> and <2> of FIG. 9. Incondition <1>, the polarity the peak value of the previous validmountain is compared with the polarity of that the peak value of thepresent valid mountain in order to produce a result of determination asto whether or not the peak value of the previous valid mountain has apolarity opposite to the polarity of the peak value of the present validmountain. On the other hand, in condition <2>, a difference inappearance timing between the positive and negative peak values shall bea value in a range sandwiched by predetermined threshold values ts1 andts2. In the figure, for example, the range sandwiched by the thresholdvalues ts1 and ts2 determined in advance is a range indicateddotted/dashed-line arrows.

If the conditions <1> and <2> are satisfied and two consecutive positiveand negative peak values are alternately detected, the value of theshake count is incremented by 1 (+1). That is to say, only if twoconsecutive alternating mountains satisfying conditions <1> and <2> asdescribed above are detected, does the value of the shake count becomeat least equal to 2. The detection of such two consecutive mountainsindicates that a back-and-forth motions have been made as a result of ashake operation. In other words, the value of the shake count is made atleast equal to 2 because a result of determination indicates that aback-and-forth motions have been made as a result of a shake operation.

Basically, if a next mountain satisfying conditions <1> and <2> shown inFIG. 8 appears thereafter, conditions <1> and <2> shown in FIG. 9 aretested in order to produce a result of determination as to whether ornot the appearing mountain and a mountain immediately preceding theappearing mountain are detected as consecutive valid mountains. If theresult of the determination indicates that the appearing mountain andthe immediately preceding mountain are detected as consecutive validmountains satisfying conditions <1> and <2> shown in FIG. 9, the valueof the shake count is incremented by 1 (+1). Then, as the shake countreaches a value determined in advance, completion of execution of ashake operation is confirmed. That is to say, if two consecutivealternating mountains are detected as a couple of mountains indicating acouple of back-and-forth motions caused by a shake operation and thenumber of such consecutive-alternating-mountain couples is at leastequal than the value determined in advance, the existence of a shakeoperation is determined.

As described above, in the embodiment, the conditions for a previousvalid mountain and a present valid mountain to be regarded as twoconsecutive mountains (that is, the conditions for completion ofexecution of two back-and-forth motions) are a condition that the twomountains shall have peak values with positive and negative polaritiesand a condition that a difference in timing between the two peak valuesshall be a value in a range determined in advance. If the condition thatthe two mountains shall have peak values with positive and negativepolarities is not satisfied, the non-existence is determined. In thiscase, the value of the shake count is not reset immediately. Instead,deferment processing to be explained below by referring to FIG. 10 iscarried out.

FIG. 10 is an explanatory diagram to be referred to in description ofdeferment processing to be carried out if the condition that the twomountains shall have peak values with positive and negative polaritiesis not satisfied. First of all, notation <1> shown in FIG. 10 denotes afirst mountain that satisfies the conditions described earlier byreferring to FIG. 8. In this case, the value of the shake count is setat 1. Then, a next mountain <2> appears after the mountain <1>. As shownin the figure, however, the condition that the 2 mountains <1> and <2>shall have peak values with positive and negative polarities is notsatisfied.

In this case, the timing of the peak value of the mountain <2>, whichdoes not satisfy the condition that the two mountains <1> and <2> shallhave peak values with positive and negative polarities, is savedtentatively in a process denoted by reference numeral <3>. In addition,the value of the shake count is sustained as it is. Thus, for themountain <2>, which does not satisfy the condition that the twomountains <1> and <2> shall have peak values with positive and negativepolarities, condition <2> shown in FIG. 9 is not examined in order toproduce a result of determination whether or not continuity existsbetween the mountain <1> immediately leading ahead of the mountain <2>and the mountain <2> for the present.

Then, a next mountain <4> appears after the mountain <2>. The mountain<4> satisfies the condition that the two mountains <2> and <4> shallhave peak values with positive and negative polarities. To be morespecific, the polarity of the peak value of the mountain <2>, the timingof which has been saved tentatively, is positive while the polarity ofthe peak value of the mountain <4> appearing presently is negative. Inthis case, the condition related to the timing saved regularly as thetiming of the peak value of the regular mountain <1> is examined inorder to produce a result of determination whether or not the conditionis satisfied in a process denoted by reference numeral <5>. That is tosay, the timing of the peak value of the mountain <4> satisfying thecondition that the two mountains <1> and <4> shall have peak values withpositive and negative polarities is examined in order to produce aresult of determination as to whether or not the difference between thetiming saved regularly as the timing of the peak value of the regularmountain <1> and the timing of the peak value of the mountain <4> has avalue in a range determined in advance, that is, whether or not theprevious regular mountain <1> and the present mountain <4> are twoconsecutive valid mountains. If the result of the determination carriedout in the process <5> indicates that the previous regular mountain <1>and the present mountain <4> are two consecutive valid mountains, thevalue of the shake count is incremented by 1 (+1) to show that these twomountains are caused by a back-and-forth motions resulting from a shakeoperation.

If the result of the determination carried out in the process <5>indicates that the previous regular mountain <1> and the presentmountain <4> are not two consecutive valid mountains, on the other hand,the condition related to the timing saved tentatively as the timing ofthe peak value of the mountain <2> is examined in order to produce aresult of determination whether or not the condition is satisfied in aprocess denoted by reference numeral <6>. That is to say, whether or notthe difference between the timing saved tentatively as the timing of thepeak value of the mountain <2> and the timing of the peak value of themountain <4> has a value in the range determined in advance is examined.If the result of the determination carried out in the process <6>indicates that the immediately preceding regular mountain <2> and thepresent mountain <4> are two consecutive valid mountains, the value ofthe shake count is set at 2. That is to say, since the previous regularmountain <1> and the present mountain <4> are not two consecutive validmountains, the value of the shake count is not incremented. Since theimmediately preceding mountain <2> and the present mountain <4> are twoconsecutive valid mountains, however, the value of the shake count isset at 2.

If the result of the determination carried out in the process <6>indicates that the difference between the timing saved tentatively asthe timing of the peak value of the mountain <2> and the timing of thepeak value of the mountain <4> has a value not in the range determinedin advance, implying that the tentatively assumed immediately precedingmountain <2> and the present mountain <4> are not two consecutive validmountains, on the other hand, the value of the shake count is set at 1.That is to say, since the previous regular mountain <1> and the presentmountain <4> are not two consecutive valid mountains and the tentativelyassumed immediately preceding mountain <2> and the present mountain <4>are not two consecutive valid mountains either, the value of the shakecount is set at 1. For the purpose of confirmation, the value of theshake count is set at 1 because the mountain <4> itself is a validmountain satisfying the conditions shown in FIG. 8.

As described above by referring to FIG. 10, after the regular validmountain <1> satisfying the conditions described earlier by referring toFIG. 8 appears, the valid mountain <2> not satisfying condition <1>shown in FIG. 9 as a condition that the two mountains <1> and <2> shallhave peak values with positive and negative polarities appears. In thiscase, the timing of the peak value of the mountain <2> is savedtentatively without testing condition <2> shown in FIG. 9 as a conditionfor continuity between the mountain <2> and the mountain <1>. Then, whenthe regular valid mountain <4> satisfying condition <1> shown in FIG. 9as a condition that the two mountains <2> and <4> shall have peak valueswith positive and negative polarities appears, condition <2> shown inFIG. 9 as a condition for continuity between the mountains <1> and <4>is examined in order to produce a result of determination whether or notcondition <2> is satisfied. If the condition for continuity between themountains <1> and <4> is not satisfied, the tentatively saved timing ofthe peak value of the mountain <2> is utilized and the condition forcontinuity between the mountains <2> and <4> is examined in order toproduce a result of determination as to whether or not the condition issatisfied.

By carrying out the deferment processing as described above, even ifconsecutive valid mountains <1> and <2> having peak values of the samepolarity are detected for some reasons, the next mountain <4> may have apeak value of the polarity opposite to the same polarity of the twopreceding mountains <1> and <2>. In this case, condition <2> for thecontinuity can be examined. In the past, there was a problem that whenconsecutive valid mountains <1> and <2> having peak values of the samepolarity were detected for some reasons, the value of the shake countwas reset even if the continuity between the valid mountains <1> and <2>have been confirmed. By carrying out the deferment processing asdescribed above, however, the problem can be avoided.

In order to confirm what has been described above, FIG. 11A is given asa diagram showing a typical waveform of the evaluation signal J computedin a shake operation. On the other hand, FIG. 11B is given as a diagramshowing shake-count value changes accompanying the waveform. First ofall, in this embodiment, let us assume that a shake operation is definedas an operation resulting in three successive pairs of back-forthmotions made consecutively along the time axis. In conformity with thisdefinition, in the portable content player 1, completion of execution ofa shake operation is confirmed when the value of the shake count reaches‘6’ corresponding to the three successive pairs of back-forth motions.

As is obvious from the descriptions given so far, in the processing todetect a shake operation as shown in FIG. 11, first of all, a basicprocess is carried out to produce a result of determination as towhether or not a mountain appearing between 0 crosses as a mountain ofthe evaluation signal J is a valid mountain by testing conditions <1>and <2> shown in FIG. 8. In this case, let us pay attention to theprocess of producing a result of determination as to whether or not amountain appearing between 0 crosses as a mountain of the evaluationsignal J is a valid mountain by testing conditions <1> and <2> shown inFIG. 8. Thus, the process of producing a result of determination as towhether or not a mountain appearing between 0 crosses is a validmountain is always carried out with a 0-cross timing. That is to say,the length of the period sandwiched between the 0-cross timings (or thelength of an interval between the 0-cross timings) is naturally unknownunless the 0-cross timings themselves are detected. In addition, thelargest value among values between the 0-cross timings may not beconfirmed as the peak value of the mountain unless the 0-cross timingsthemselves are detected.

In addition, after a valid mountain is detected and the shake count isincremented to a value at least equal to 1, as described earlier byreferring to FIG. 9, the polarity of the peak value of the next detectedvalid mountain is examined in order to produce a result of determinationas to whether or not the polarity is opposite to the polarity of thepeak value of the immediately preceding valid mountain. In addition, thedifference in peak-value timing between the immediately preceding validmountain and the next detected valid mountain is examined in order toproduce a result of determination as to whether or not the differencehas a value within a range determined in advance, that is, in order toproduce a result of determination as to whether or not continuity existsbetween the next detected valid mountain and the immediately precedingvalid mountain. Also in this case, it is not until the detection of the0-cross timings that the peak values and the peak-value timings areknown. Thus, a process is carried out with the 0-cross timing as theprocess of producing a result of determination as to whether or notcontinuity exists between the next detected valid mountain and theimmediately preceding valid mountain.

With the above descriptions taken into consideration, a mountainappearing in a 0-cross period between times t0 and t1 shown in FIGS. 11Aand 11B is examined with the 0-cross timing at the time t1 in order toproduce a result of determination as to whether the mountain is a validor invalid mountain. If the result of the determination indicates thatthe mountain appearing in the 0-cross period between the times t0 and t1is a valid mountain, the value of the shake count is incremented fromthe present value of ‘0’ to ‘1’.

By the same token, a mountain appearing in a 0-cross period betweentimes t1 and t2 shown in FIGS. 11A and 11B is examined with the 0-crosstiming at the time t2 in order to produce a result of determination asto whether the mountain is a valid or invalid mountain. If the result ofthe determination indicates that the mountain appearing in the 0-crossperiod between the times t1 and t2 is a valid mountain, the differencein peak-value timing between the mountain appearing in the 0-crossperiod between the times t0 and t1 and the mountain appearing in the0-cross period between the times t1 and t2 is examined with the 0-crosstiming at the time t2 in order to produce a result of determination asto whether continuity exists between the two mountains. This is becausethe shake count has reached a value at least equal to ‘1’. If the resultof the determination indicates that continuity exists between the twomountains, the value of the shake count is incremented by 1 (+1). Thatis to say, the value of the shake count is incremented from ‘1’ to ‘2’at the time t2.

Thereafter, in the same way, with each of the 0-cross timings at timest3, t4, t5 and t6, a process is carried out to produce a result ofdetermination as to whether a mountain immediately preceding the 0-crosstiming is a valid or invalid mountain and, if the result of thedetermination indicates that the mountain is a valid mountain, a processis carried out to produce a result of determination as to whether or notcontinuity exists between the mountain and a mountain immediatelypreceding the mountain. If the result of the determination indicatesthat continuity exists between the two mountains, the value of the shakecount is incremented by 1 (+1). If a valid mountain appears in a periodof time between every two consecutive 0-cross timings as shown in thefigure and continuity exists between every 2 successive valid mountains,the value of the shake count is sequentially incremented by ‘1’ and atthe time t6 value of the shake count is ‘6’. As the value of the shakecount become ‘6’, completion of execution of a shake operation isconfirmed. In the following description, the operation to confirm thecompletion state of execution of a shake operation is referred to as a‘shake-on’ action.

As a shake-on action is taken as described above, the control unit 2resets the value of the shake count to 0. In addition, the control unit2 takes a predetermined period of time following the shake-on action asa shake-on prevention interval for preventing a shake-on action frombeing taken again. By setting such a shake-on prevention interval aftera shake-on action in this way, it is possible to prevent a shakeoperation from being detected frequently during a short period of timeand, for example, prevent a reproduction mode to be described later frombeing switched many times during the shake-on prevention interval.

It is to be noted that, for the sake of the explanation convenience, theprocesses to produce a result of determination as to whether a mountainis valid or invalid and whether or not a continuity exists between thepresent valid mountain and an immediately preceding valid mountain areeach carried out with a 0-cross timing. In accordance with the presentinvention, however, the value of the evaluation signal J is computedwith a sampling timing. Thus, it is not necessarily possible to detect a0-cross timing. For this reason, in actuality, a timing between twoconsecutive sampling timings with which the values of the evaluationsignal J have different polarities is taken as a 0-cross timing. Even ifa timing between two consecutive sampling timings with which the valuesof the evaluation signal J have different polarities is taken as a0-cross timing, however, the operation to take such a timing as a0-cross timing is essentially equivalent to an operation to detect a0-cross timing. For this reason, a timing between two consecutivesampling timings with which the values of the evaluation signal J havedifferent polarities is taken as a 0-cross timing.

As described above, in the embodiment, on the basis of restrictivevalidity conditions set for the width and amplitude of a mountainappearing on the waveform of an evaluation signal J, it is possible toproduce a result of determination as to whether the mountain is a validor invalid mountain, that is, whether or not one of 2 back-and-forthmotions caused by shake operation has been made.

In addition, as a positive/negative polarity condition, the polarity ofthe peak value of a newly appearing valid mountain satisfying therestrictive validity conditions is examined in order to produce a resultof determination as to whether or not the polarity is opposite to thepolarity of the peak value of the immediately preceding valid mountain,that is, whether or not the polarity of the peak value of the newlyappearing valid mountain is positive whereas the polarity of the peakvalue of the immediately preceding valid mountain is negative, or viceversa. Then, in addition to the positive/negative polarity condition, asa time-wise restrictive condition, the difference in timing between thepolarity of the peak value of the newly appearing valid mountain and thepeak value of the immediately preceding valid mountain is examined inorder to produce a result of determination as to whether or not thedifference has a value in a range determined in advance. Then, on thebasis of results of testing the positive/negative polarity condition andthe time-wise restrictive condition, it is possible to produce a resultof determination as to whether or not a couple of back-and-forth motionscaused by a shake operation have been made.

As described above, on the basis of restrictive validity conditions setfor the width and amplitude of a mountain appearing on the waveform ofan evaluation signal J, it is possible to produce a result ofdetermination as to whether or not one of back-and-forth motions hasbeen made. Then, on the basis of the validity of a mountain, it ispossible to properly exclude a waveform not assumed to be a waveformindicating a movement caused by a shake operation. An example of such awaveform is a waveform having an extremely large or small peak value oran extremely long or short interval between 0-cross timings.

In addition, when a next valid mountain satisfying the restrictivevalidity conditions newly appears, the positive/negative polaritycondition and the time-wise restrictive condition are examined. Then, onthe basis of the existence of such opposite polarities and the existenceof such continuity, it is possible to properly exclude a waveform notdemonstrating the continuity of a couple of back-and-forth motionscaused by a shake operation. An example of such a waveform is a waveformhaving an extremely long or short distance between the newly appearingvalid mountain and the immediately preceding valid mountain or the awaveform with a newly appearing valid mountain having the same polarityof its peak value as the peak value of the immediately preceding validmountain.

Thus, in accordance with the shake-operation detection techniqueprovided by the embodiment, it is possible to effectively prevent ashake operation from being detected mistakenly.

Let us assume a case in which a shake operation is detected inaccordance with the shake-operation detection technique according to theembodiment by examining the evaluation signals J shown in FIGS. 6B and7B as evaluation signals J each obtained as a result of the day-to-dayordinary use of the portable electronic apparatus. As described earlier,the evaluation signal J shown in FIG. 6B is obtained when the portableelectronic apparatus is used by being inserted in a back pack whereasthe evaluation signal J shown in FIG. 7B is obtained when the portableelectronic apparatus is used by being hung from a strap. In the case ofthe evaluation signal J shown in FIG. 6B, the waveform is shifted in adirection toward one of the polarities of the peak values by an offsetfrom the 0 level serving as the center of the polarities. Thus,particularly in this case, the amplitude of each peak value on thenegative-polarity side is not sufficient as is obvious from the figure.As a result, it is very certainly out of the bounds of possibility thata shake operation is mistakenly detected by adoption of theshake-operation detection technique according to the embodiment on thebasis of the evaluation signal J shown in FIG. 6B. In the case of theevaluation signal J shown in FIG. 7B, on the other hand, the intervalbetween 0 crosses is rather long so that, also in this case, it is outof the bounds of possibility that a shake operation is mistakenlydetected by adoption of the technique according to the embodiment on thebasis of the evaluation signal J shown in FIG. 7B. Thus, in accordancewith the shake-operation detection technique provided by the embodiment,it is possible to effectively prevent a shake operation from beingdetected mistakenly.

In addition, in the embodiment, an evaluation signal J representing theamplitudes of acceleration signals as well as positive and negativepolarities of the acceleration signals is generated as a signal to beused in a process to detect a shake operation and a technique based onconditions set for the time, amplitude as well as positive/negativepolarity alternation of the evaluation signal J is adopted as atechnique for detecting the shake operation. Thus, a shake operationdeliberately carried out by the user can be defined as an operation tobe detected for the purpose of controlling predetermined operations tobe performed by the portable electronic apparatus. An accelerationpattern very hardly generated as a day-to-day pattern can be taken as anacceleration pattern generated by such a shake operation. Thus, in thisembodiment, an operation to be detected is a shake operation, which isnot a day-to-day operation, whereas the technique for detecting anoperation, which is not a day-to-day operation, is a techniquespecialized for detection of a shake operation. Since the techniqueadopted by the embodiment as a technique for detecting an operation,which is not a day-to-day operation, is specialized for detection of ashake operation, it is possible to effectively prevent a shake operationfrom being detected mistakenly.

[Typical Actual Operation Control According to a Detected ShakeOperation]

In the portable content player 1 according to the embodiment, inaccordance with a shake operation detected on the basis of results ofexamining a variety of conditions set for the evaluation signal Jexplained earlier, the portable content player 1 is controlled to carryout an operation determined in advance. To put it concretely, thecontrol unit 12 employed in the portable content player 1 according tothe embodiment executes control to switch the reproduction mode from anormal reproduction mode to a shuffle reproduction mode or vice versa inaccordance with a result of detecting a shake operation carried out bythe user.

The shuffle reproduction mode is a mode in which an operation is carriedout to reproduce a plurality of contents in a random reproduction orderin place of a normal reproduction order set for a process to reproduce aplurality of contents in the normal reproduction mode. Let us assume forexample that a plurality of contents pertain to an album. In this case,the normal reproduction order is a reproduction order set for the album.The reproduction order set for an album is referred to as an album intrareproduction order. If the shuffle reproduction mode is deliberately setin such the operation to reproduce the contents of the album, however,the contents selected at random are sequentially reproduced in a randomreproduction order in place of the album infra reproduction order.

To put it concretely, in the shuffle reproduction mode of the portablecontent player 1 according to the embodiment, shuffle reproductionoperations called ‘Repeat Shuffle All’ and ‘Repeat Shuffle Folder’ canbe carried out. In the ‘Repeat Shuffle All’ reproduction operation, thereproduction range covers all contents (or all pieces of musical data)stored in advance in the content storage unit 4 and, thus, all themusical contents are reproduced in the shuffle reproduction mode. Theword ‘Repeat’ used in the name of the reproduction operation suggeststhat the operation to reproduce the contents in the shuffle reproductionmode is carried out repeatedly till the user performs an operation tostop the reproduction operation. In the ‘Repeat Shuffle Folder’reproduction operation, on the other hand, the reproduction range coverscontents (or pieces of musical data) stored in a specified folder in thecontent storage unit 4 and, thus, the musical contents in the folder arereproduced in the shuffle reproduction mode. By the same token, the word‘Repeat’ used in the name of the reproduction operation suggests thatthe operation to reproduce the contents in the shuffle reproduction modeis carried out repeatedly till the user performs an operation to stopthe reproduction operation.

In the normal reproduction mode of the portable content player 1according to the embodiment, on the other hand, normal reproductionoperations called ‘All Songs (Normal)’, ‘Folder’, ‘Repeat All’, ‘RepeatFolder’ and ‘Repeat 1 Song’ can be carried out. In the ‘All Songs’normal reproduction operation, the reproduction range covers all piecesof musical data stored in advance in the content storage unit 4 and,thus, all the musical contents are reproduced in a list-up order alsoreferred to as a reproduction list order. Since the word ‘Repeat’ is notused in the name of the reproduction operation, as the reproduction ofthe content on the list is completed, the reproduction operation isended automatically. In the ‘Folder’ normal reproduction operation, thereproduction range covers pieces of musical data stored in a specifiedfolder and, thus, the musical contents stored in the specified folderare reproduced in a list-up order. In the ‘Repeat All’ normalreproduction operation, the reproduction range covers all pieces ofmusical data stored in advance in the content storage unit 4, same rangeas ‘All Song’, and thus, all the musical contents are reproducedrepeatedly in a list-up order. In the ‘Repeat Folder’ normalreproduction operation, the reproduction range covers pieces of musicaldata stored in a specified folder, same range as ‘Folder’, and thus, themusical contents stored in the specified folder are reproducedrepeatedly in a list-up order. In the ‘Repeat 1 Song’ normalreproduction operation, a specified content is reproduced repeatedly.

In a shake-on action taken as confirmation of detection of a shakeoperation, the control unit 2 executes control to change thereproduction mode from the normal reproduction mode to the shufflereproduction mode if the present reproduction mode is the normalreproduction mode. If the present reproduction mode is the shufflereproduction mode, on the other hand, the control unit 2 executescontrol to change the reproduction mode from the shuffle reproductionmode to the normal reproduction mode in a shake-on action. Typicalswitching of the reproduction mode is explained as follows. First ofall, if the present reproduction mode is the normal reproduction mode inwhich ‘All Songs’, ‘Folder’ or ‘Repeat All’ normal reproductionoperation is carried out, the normal reproduction mode is changed to theshuffle reproduction mode as follows:

‘All Songs’→‘Repeat Shuffle All’,

‘Folder’→‘Repeat Shuffle Folder’ or

‘Repeat All’→‘Repeat Shuffle All’

It is to be noted that, if the present reproduction mode is the normalreproduction mode in which ‘Repeat 1 Song’ normal reproduction operationis carried out, the normal reproduction mode is not changed to theshuffle reproduction mode.

If the present reproduction mode is the shuffle reproduction mode inwhich ‘Repeat Shuffle All’ or ‘Repeat Shuffle Folder’ shufflereproduction operation is carried out, on the other hand, the shufflereproduction mode is changed to the normal reproduction mode as follows:

‘Repeat Shuffle All’→‘Repeat All’ or

‘Repeat Shuffle Folder’→‘Repeat Folder’.

In addition, when the normal reproduction mode is changed to the shufflereproduction mode in an operation to switch the reproduction mode inaccordance with a shake action, control is executed to reproduce acontent different from a content being reproduced in the normalreproduction mode. When the shuffle reproduction mode is converselychanged to the normal reproduction mode in an operation to switch thereproduction mode in accordance with a shake action, on the other hand,control is executed to continue the reproduction of a content reproducedin the shuffle reproduction. Then, as the reproduction of the content isended or the reproduction mode is changed at the end of the reproductionof the content, next contents on a reproduction list are reproduced inaccordance with a reproduction-list order. Let us assume that theshuffle reproduction mode is changed to the normal reproduction mode asfollows: ‘Repeat Shuffle All’→‘Repeat All’. In this case, thereproduction list includes contents in a reproduction range, whichcovers all contents stored in advance in the content storage unit 4.Thus, after the reproduction of a content being reproduced in theshuffle reproduction mode is ended, a content included on thereproduction list as a content immediately following the reproducedcontent is reproduced next. As another example, let us assume that theshuffle reproduction mode is changed to the normal reproduction mode asfollows: ‘Repeat Shuffle Folder’→‘Repeat Folder’. In this case, thereproduction list includes contents in a reproduction range, whichcovers contents stored in a specified folder. Thus, after thereproduction of a content being reproduced in the shuffle reproductionmode is ended, a content included on the reproduction list as a contentimmediately following the reproduced content is reproduced next.

In addition, when the normal reproduction mode is changed to the shufflereproduction mode or vice versa in an operation to switch thereproduction mode in accordance with a shake action in the embodiment,control is executed to output a sound effect. To put it concretely, whenthis control is executed in an operation to change the reproduction modefrom the normal reproduction mode to the shuffle reproduction mode upondetection of a shake operation, an operation to reproduce a contentdifferent from a content being reproduced in the normal reproductionmode is started after the sound effect has been output. When thiscontrol is executed in an operation to change the reproduction mode fromthe shuffle reproduction mode to the normal reproduction mode upondetection of a shake operation, on the other hand, a reproductionoperation is carried out by continuing the reproduction of a contentbeing reproduced in the shuffle reproduction mode after the sound effecthas been output.

In addition, in the embodiment, in accordance with operation controlrelated a reproduction mode set in accordance with detection of a shakeoperation as described above, control to turn on the acceleration sensor12 is also executed when a content is being reproduced. To put itconcretely, in accordance with an already established state to startreproduction of a content, the control unit 2 controls a battery servingas a power-supply unit to supply power to the acceleration sensor 12. Anexample of the state to start reproduction of a content is a state inwhich a command to start reproduction of a content has been entered asan operation input by the user by operating the operation unit 8. Inaccordance with an already established state to stop reproduction of acontent, on the other hand, the control unit 2 executes control to turnoff the acceleration sensor 12. An example of the state to stopreproduction of a content is a state in which a command to stopreproduction of a content has been entered as an operation input by theuser by operating the operation unit 8. By execution of the controloperations described above, the acceleration sensor 12 is turned on ifnecessary. Thus, power consumption can be made small in comparison with,for example, an apparatus in which the acceleration sensor 12 is put inan on state all the time.

As described above, the portable content player 1 according to theembodiment switches the reproduction mode from the normal reproductionmode to the shuffle reproduction mode or vice versa when a shakeoperation is detected. Thus, with this feature of reproduction-modeswitching, shaking caused by a shake operation carried out by the userallows the user to feel the sense of mixing contents in a shufflereproduction mode. In addition, with this feature of reproduction-modeswitching, it is possible to improve the entertaining characteristic ofthe portable content player 1. Moreover, this feature ofreproduction-mode switching implements a useful user interface capableof providing the user with an intuitive sense of operations.

[Processing]

By referring flowcharts shown in FIGS. 12 to 16, the followingdescription explains processing to be carried out in order to implementthe operations explained so far as the operations of the embodiment.First of all, FIGS. 12 to 15 show flowcharts illustrating the flows ofprocessing to be carried out in order to detect a shake operation. It isto be noted that the processing to detect a shake operation is carriedout on the basis of a shake-operation detection program 3 a stored inthe nonvolatile memory unit 3 as a program to be executed by the CPUemployed in the control unit 2.

FIG. 12 shows a flowchart exhibiting the flow of processing carried outto generate an evaluation signal J on the basis of an accelerationsignal from the acceleration sensor 12 as a particular part ofprocessing to detect a shake operation in accordance with theembodiment. As shown in the figure, the flowchart begins with a stepS101 at which acceleration signals generated by the acceleration sensor12 are sampled. To be more specific, at this step, acceleration signalsgenerated by the acceleration sensor 12 as signals for the Y and Z axesare sampled. Sampled values ay for the Y axis and sampled values az forthe Z axis are thus obtained.

Then, at the next step S102, a sum norm is computed. To put it indetail, the CPU finds the absolute value of the value ay obtained at thestep S101 as a sampled value ay of the acceleration signal generated forthe Y axis and the absolute value of the value az obtained at the stepS101 as a sampled value az of the acceleration signal generated for theZ axis. Then, the sum norm of the absolute values is computed.Subsequently, at the next step S103, the computed sum norm is stored inan internal PAM employed in the control unit 2 or the like.

Then, at the next step S104, an evaluation signal J is computed. To putit in detail, an evaluation signal J is computed by subtracting apresently stored average value ag to be described below from the sumnorm found at the step S102.

As is obvious from the above description, it is necessary to find theaverage value ag in advance in order to compute the evaluation signal J.Abbreviated in the figures, the control unit 2 finds the average valueag in processing carried out in parallel to the processing representedby the flowchart shown in FIG. 12. The sum norm is computed at the stepS102 and stored in the internal RAM at the step S103 for every samplingtiming. The average value ag is the average of the sums norm eachcomputed and stored at one of sampling times during a period determinedin advance.

Then, at the next step S105, the evaluation signal J computed at thestep S104 is stored. After the evaluation signal J is stored, the flowof program execution returns to the calling program.

FIG. 13 shows a flowchart exhibiting the flow of processing carried outto obtain information on a count value counted between 0 crosses as aparticular part of processing to detect a shake operation in accordancewith the embodiment. As shown in the figure, the flowchart begins with astep S201 to carry out a process of producing a result of determinationas to whether or not two consecutive values of the evaluation signal Jhave polarities opposite to each other. That is to say, the value storedat the step S105 for the present sampling time as the value of theevaluation signal J is compared with the value stored at the step S105for the immediately preceding sampling time in order to produce a resultof determination as to whether or not the two consecutive values of theevaluation signal J have polarities opposite to each other. The processcarried out at the step S201 is a process of producing a result ofdetermination as to whether or not the evaluation signal J has changedfrom a specific polarity to another polarity opposite to the specificpolarity through a 0 cross.

If the determination result produced in the process carried out at thestep S201 is a negation indicating that the two consecutive values ofthe evaluation signal J have polarities not opposite to each other, theflow of the processing goes on to a step S202 at which the value of a0-cross interval counter is incremented by 1 (+1). Then, the flow ofprogram execution returns to the calling program as shown in the figure.The 0-cross interval counter is a counter implemented by a processcarried out by the control unit 2 as a counter for measuring theinterval between two consecutive 0 crosses or measuring the length of aperiod between two consecutive 0 crosses.

If the determination result produced in the process carried out at thestep S201 is an affirmation indicating that the two consecutive valuesof the evaluation signal J indeed have polarities opposite to eachother, on the other hand, the flow of the processing goes on to a stepS203 at which the present value of the 0-cross interval counter is savedas the 0-cross interval count. Then, at the next step S204, the 0-crossinterval counter is reset to 0. Finally, the flow of program executionreturns to the calling program as shown in the figure.

FIG. 14 shows a flowchart exhibiting the flow of processing carried outto obtain information on the peak value of a mountain appearing in thewaveform of the evaluation signal J and the timing of the peak value asa particular part of processing to detect a shake operation inaccordance with the embodiment. As shown in the figure, the flowchartbegins with a step S301 to carry out a process of producing a result ofdetermination as to whether or not two consecutive values of theevaluation signal J have polarities opposite to each other in the sameway as the step S201 of the flowchart shown in FIG. 13. If thedetermination result produced in the process carried out at the stepS301 is a negation indicating that the two consecutive values of theevaluation signal J have polarities not opposite to each other, the flowof the processing goes on to a step S302 to carry out a process ofproducing a result of determination as to whether or not the absolutevalue of the present value of the evaluation signal J is greater than acandidate for a peak value.

The aforementioned candidate for a peak value is a tentative value usedin a process for finding the peak value. As will be described later, ifthe absolute value of the present value of the evaluation signal J isgreater than the candidate for the peak value, the candidate is updatedby replacing the candidate with the absolute value. If the absolutevalue of the present value of the evaluation signal J is not greaterthan the candidate for the peak value, on the other hand, the candidateis not updated. The candidate obtained eventually is used as the peakvalue.

If the determination result produced in the process carried out at thestep S302 is a negation indicating that the absolute value of thepresent value of the evaluation signal J is not greater than thecandidate for the peak value, the flow of program execution returns tothe calling program without carrying out further processes as shown inthe figure. If the determination result produced in the process carriedout at the step S302 is an affirmation indicating that the absolutevalue of the present value of the evaluation signal J is indeed greaterthan the candidate for the peak value, on the other hand, the flow ofthe processing goes on to a step S303 at which the candidate for thepeak value is updated. To put it concretely, the candidate is replacedby the absolute value of the present value of the evaluation signal J.

Then, at the next step S304, information on a candidate for the timingof the peak value is updated. The information on a candidate for thetiming of the peak value is stored information to be used indetermination of the timing of the peak value. To put it concretely, atthe next step S304, the information on a candidate for the timing of thepeak value is replaced with information on the present sampling timing.In this way, when the candidate for a peak value is updated, theinformation on a candidate for the timing of the peak value is alsoupdated as well. Thus, the eventually obtained candidate for the timingof the peak value is used as the timing of the peak value.

If the determination result produced in the process carried out at thestep S301 is an affirmation indicating that the two consecutive valuesof the evaluation signal J indeed have polarities opposite to eachother, on the other hand, the flow of the processing goes on to a stepS305 at which the present candidate for the peak value is saved in amemory as the peak value. Then, at the next step S306, the presentinformation on a candidate for the timing of the peak value is saved ina memory as information on the peak-value timing.

Subsequently, at the next step S307, the candidate for the peak value isupdated by replacing the candidate with the present value of theevaluation signal J and information on a candidate for the timing of thepeak value is updated by replacing the information with the presentsampling timing. In this way, when two consecutive values of theevaluation signal J have polarities opposite to each other, the presentvalue of the evaluation signal J is used as the first candidate for thepeak value of the waveform of the evaluation signal J and the presentsampling timing is used as the information on a candidate for the timingof the peak value. Then, after the execution of the process of the stepS307 is completed, the flow of program execution returns to the callingprogram as shown in the figure.

FIG. 15 shows a flowchart exhibiting the flow of processing carried outto produce a variety of determination results for detection of a shakeoperation by making use of a 0-cross interval count value obtained inthe processing represented by the flowchart shown in FIG. 13 as a countvalue for the evaluation signal J obtained in the processing representedby the flowchart shown in FIG. 12 as well as making use of a peak valueand information on the timing of the peak value, which have beenobtained in the processing represented by the flowchart shown in FIG.14, as a particular part of processing to detect a shake operation inaccordance with the embodiment. As shown in FIG. 15, the flowchartbegins with a step S401 to carry out a process of producing a result ofdetermination as to whether or not two consecutive values of theevaluation signal J have polarities opposite to each other. If thedetermination result produced in the process carried out at the stepS401 is a negation indicating that the two consecutive values of theevaluation signal J have polarities not opposite to each other, the flowof the processing goes back to the step S401 to repeat the determinationprocess of the step. As a matter of fact, the determination process ofthe step S401 is carried out repeatedly in a state of waiting for anaffirmation determination result to indicate that two consecutive valuesof the evaluation signal J indeed have polarities opposite to eachother. As the determination result produced in the process carried outat the step S401 becomes an affirmation indicating that the twoconsecutive values of the evaluation signal J indeed have polaritiesopposite to each other, the flow of the processing goes on to a stepS402 to carry out a process of producing a result of determination as towhether or not the 0-cross interval count has a value in a rangedetermined in advance. The range determined in advance is a rangebetween the aforementioned threshold values zcrs1 and zcrs2 determinedin advance as explained earlier by referring to FIG. 8.

If the determination result produced in the process carried out at thestep S402 is a negation indicating that the 0-cross interval count has avalue not in the range between the threshold values zcrs1 and zcrs2determined in advance, the flow of the processing goes on to a step S410at which the present peak value and the timing of the present peak valueare invalidated. By carrying out the process of the step S410, it ispossible to prevent the peak value of the present mountain appearing inthe waveform of the evaluation signal J and the timing of the presentpeak value from being used as the peak value of the immediatelypreceding mountain and the timing of the peak value of the immediatelypreceding mountain respectively when a next valid mountain following theimmediately preceding mountain is detected. This is because the presentmountain is an invalid mountain not satisfying a condition requiringthat the 0-cross interval count shall have a value in the range betweenthe threshold values zcrs1 and zcrs2 determined in advance. After theexecution of the process of the step S410 is completed, the flow of theprocessing goes back to the step S401 as shown in the figure. In thisway, the determination process of the step S401 can be carried outrepeatedly in a state of waiting for a next 0-cross timing to arrive asa timing with which two consecutive values of the evaluation signal Jhave polarities opposite to each other as well as waiting for the0-cross interval count shall have a value in the range between thethreshold values zcrs1 and zcrs2 determined in advance.

If the determination result produced in the process carried out at thestep S402 is an affirmation indicating that the 0-cross interval countindeed has a value in the range between the threshold values zcrs1 andzcrs2 determined in advance, on the other hand, the flow of theprocessing goes on to a step S403 to carry out a process of producing aresult of determination as to whether or not the peak value is in arange determined in advance, that is, whether or not the peak value isin a range between the afore mentioned threshold values max1 and max2determined in advance.

If the determination result produced in the process carried out at thestep S403 is a negation indicating that the peak value is not in therange determined in advance, the flow of the processing goes on to astep S411 at which the present peak value and the timing of the presentpeak value are invalidated. After the execution of the process of thestep S411 is completed, the flow of the processing goes back to the stepS401 as shown in the figure. By carrying out the process of the stepS411, it is possible to prevent the peak value of the present mountainof the waveform of the evaluation signal J and the timing of the presentpeak value from being used as the peak value of the immediatelypreceding mountain and the timing of the peak value of the immediatelypreceding mountain respectively when a next valid mountain following theimmediately preceding mountain is detected. This is because, as is thecase with the step S410 described earlier, the present mountain is aninvalid mountain not satisfying a condition requiring that the peakvalue shall be a value in the range between the threshold values max1and max2 determined in advance.

If the determination result produced in the process carried out at thestep S403 is an affirmation indicating that the peak value is indeed avalue in the range determined in advance, on the other hand, the flow ofthe processing goes on to a step S404 to carry out a process ofproducing a result of determination as to whether or not the value ofthe shake count is at least equal to 1. If the determination resultproduced in the process carried out at the step S404 is a negationindicating that the value of the shake count is smaller than 1, the flowof the processing goes on to a step S412 at which the value of the shakecount is set at 1. Then, the flow of the processing goes back to thestep S401 as shown in the figure.

If the determination result produced in the process carried out at thestep S404 is an affirmation indicating that the value of the shake countis indeed at least equal to 1, on the other hand, the flow of theprocessing goes on to a step S405 to carry out a process of producing aresult of determination as to whether or not two successive positive andnegative peak values alternate, that is, whether or not the polarity ofa preceding peak value not invalidated is opposite to the polarity ofthe present peak value. In this case, the present peak value is a peakvalue immediately before the 0-cross timing detected in the processcarried out at the step S401 whereas the preceding peak value is a peakvalue preceding the present peak value.

If the determination result produced in the process carried out at thestep S405 is a negation indicating that 2 consecutive positive andnegative peak values do not alternate, the flow of the processing goeson to a step S413 at which the present peak value and the timing of thepresent peak value are tentatively saved. Then, the flow of theprocessing goes back to the step S401 as shown in the figure.

If the determination result produced in the process carried out at thestep S405 is an affirmation indicating that 2 consecutive positive andnegative peak values indeed alternate, on the other hand, the flow ofthe processing goes on to a step S406 to carry out a process ofproducing a result of determination as to whether or not the differencein timing between the two successive peak values has a value in a rangedetermined in advance, that is, whether or not the difference in timingbetween the aforementioned preceding peak value not invalidated and thepresent peak value described above has a value in a range between theaforementioned threshold values ts1 and ts2 determined in advance.

If the determination result produced in the process carried out at thestep S406 is a negation indicating that the difference in timing betweenthe two successive peak values has a value not in the range determinedin advance, the flow of the processing goes on to a step S407 to carryout a process of producing a result of determination as to whether ornot a peak-value timing between the timing of the aforementionedpreceding peak value not invalidated and the timing of the present peakvalue described above has been tentatively saved. If the determinationresult produced in the process carried out at the step S407 is anegation indicating that no peak-value timing between the timing of theaforementioned preceding peak value not invalidated and the timing ofthe present peak value described above has been tentatively saved, theflow of the processing goes on to the step S412 at which the value ofthe shake count is set at 1. Then, the flow of the processing goes backto the step S401 as shown in the figure.

If the determination result produced in the process carried out at thestep S407 is an affirmation indicating that a peak-value timing betweenthe timing of the aforementioned preceding peak value not invalidatedand the timing of the present peak value cited above has been indeedtentatively saved, on the other hand, the flow of the processing goes onto a step S408 to carry out a process of producing a result ofdetermination as to whether or not the difference between thetentatively saved peak-value timing and the timing of the present peakvalue described above has a value in a range determined in advance, thatis, whether or not the difference between the tentatively savedpeak-value timing and the timing or the present peak value has a valuein the range between the aforementioned threshold values ts1 and ts2determined in advance.

If the determination result produced in the process carried out at thestep S408 is a negation indicating that the difference between thetentatively saved peak-value timing and the timing of the present peakvalue has a value not in the range determined in advance, the flow ofthe processing goes on to the step S412 at which the value of the shakecount is set at 1. Then, the flow of the processing goes back to thestep S401 as shown in the figure. If the determination result producedin the process carried out at the step S408 is an affirmation indicatingthat the difference between the tentatively saved peak-value timing andthe timing of the present peak value indeed has a value in the rangedetermined in advance, on the other hand, the flow of the processinggoes on to a step S409 at which the value of the shake count is set at2. Then, the flow of the processing goes back to the step S401 as shownin the figure.

If the determination result produced in the process carried out at thestep S406 is an affirmation indicating that the difference in timingbetween the two successive peak values indeed has a value in a rangedetermined in advance, on the other hand, the flow of the processinggoes on to a step S414 at which the value of the shake count isincremented by 1.

Then, at the next step S415, the value of the shake count is comparedwith a value determined in advance in order to produce a result ofdetermination as to whether or not the value of the shake count is equalto the value determined in advance. In the case of the embodiment, thevalue determined in advance is 6. If the determination result producedin the process carried out at the step S415 is a negation indicatingthat the value of the shake count is not equal to the value determinedin advance, the flow of the processing goes back to the step S401 asshown in the figure.

If the determination result produced in the process carried out at thestep S415 is an affirmation indicating that the value of the shake countis indeed equal to the value determined in advance, on the other hand,the flow of the processing goes on to a step S416 at which a shake-onaction is taken as an action confirming that a shake operation has beencarried out. Then, at the next step S417, in accordance with theshake-on action, first of all, the value of the shake count is reset to0. Subsequently, at the next step S418, a shake-on interval is set as aninterval following the shake-on action. The shake-on interval is asubsequent period in which no shake-on action is taken. Thus, during theshake-on interval, the control unit 2 does not produce a result ofdetermination as to whether or not a shake operation has been carriedout. After the process carried out at the step S418 to set the shake-oninterval is completed, the flow of the processing goes back to the stepS401 as shown in the figure.

FIG. 16 shows a flowchart exhibiting the flow of processing to becarried out as follow-up processing upon detection of a shake operation.It is to be noted that the processing represented by the flowchart shownin FIG. 16 is carried out on the basis of a control program 3 b storedin advance in the nonvolatile memory unit 3 as a program to be executedby the CPU employed in the control unit 2. As shown in the figure, theflowchart begins with a step S501 to carry out a process of producing aresult of determination as to whether or not a shake-on action has beentaken. If the determination result produced in the process carried outat the step S501 is a negation indicating that a shake-on action has notbeen taken, the flow of the processing goes back to the step S501 torepeat the determination process. As a matter of fact, the determinationprocess of the step S501 is carried out repeatedly in a state of waitingfor a shake-on action to be taken. As described earlier, a shake-onaction is taken in the process carried out at the step S416 of theflowchart shown in FIG. 15 if the determination result produced in theprocess carried out at the step S415 of the same flowchart is anaffirmation.

As a shake-on action is taken, the flow of the processing goes on to astep S502 to carry out a process of producing a result of determinationas to whether the present reproduction mode is the shuffle reproductionmode or the normal reproduction mode. As described earlier, in theshuffle reproduction mode, the content is subjected to either a RepeatShuffle All reproduction operation or a Repeat Shuffle Folderreproduction operation. In the normal reproduction mode, on the otherhand, the content is subjected to one of normal reproduction operationscalled All Songs (Normal), Folder, Repeat All, Repeat Folder and Repeat1 Song.

If the determination result produced in the process carried out at thestep S502 is a negation indicating that the present reproduction mode isnot the shuffle reproduction mode, the flow of the processing goes on toa step S503 to carry out first of all a process of producing a result ofdetermination as to whether or not the content is being subjected to theRepeat 1 Song reproduction operation. If the determination resultproduced in the process carried out at the step S503 is an affirmationindicating that the content is indeed being subjected to the Repeat 1Song reproduction operation, the flow of program execution returns tothe calling program as shown in the figure.

If the determination result produced in the process carried out at thestep S503 is a negation indicating that the content is being subjectedto a reproduction operation other than the Repeat 1 Song reproductionoperation, on the other hand, the flow of the processing goes on to astep S504 at which the reproduction operation is stopped temporarily.Then, at the next step S505, a process to output a sound effect iscarried out. To put it in detail, at the step S504, the reproductionprocessing unit 5 is controlled to temporarily stop the operation toreproduce the present content and, at the step S505, the audio-outputprocessing unit 6 is controlled to output audio data stored in advancetypically in the nonvolatile memory unit 3 as the sound effect.

Then, the flow of the processing goes on to a step S506 to carry outfirst of all a process of producing a result of determination as towhether or not the content is being subjected to either of the All Songnormal reproduction operation and the Repeat All normal reproductionoperation. If the determination result produced in the process carriedout at the step S506 is an affirmation indicating that the content isindeed being subjected to the All Song normal reproduction operation orthe Repeat All normal reproduction operation, the flow of the processinggoes on to a step S507 to carry out a process of changing the presentnormal reproduction operation to the Repeat Shuffle All reproductionoperation. As described earlier, in the All Songs (Normal) normalreproduction operation, the reproduction range covers all contents (orall pieces of musical data) stored in advance in the content storageunit 4 and, thus, all the musical contents are reproduced in areproduction-list order. In the Repeat All normal reproductionoperation, the reproduction range also covers all contents (or allpieces of musical data) stored in advance in the content storage unit 4and, thus, all the musical contents are reproduced repeatedly in areproduction-list order. In the Repeat Shuffle All reproductionoperation set at the step S507, on the other hand, the reproductionrange also covers all contents (or all pieces of musical data) stored inadvance in the content storage unit 4 and, thus, all the musicalcontents are reproduced in the shuffle reproduction mode selecting anyone of the musical contents at random. To put it concretely, at the stepS507, first of all, the reproduction processing unit 5 is controlled toswitch the operation to select a musical content to be reproduced froman operation carried out so far as an operation based on a reproductionlist to a random-selection operation. In this case, the reproductionlist covers all musical contents as contents to be reproduced. Then, thereproduction processing unit 5 is controlled to change its setting so asto start the shuffle reproduction mode in which musical contents arereproduced thereafter in the Repeat Shuffle All reproduction operation.

If the determination result produced in the process carried out at thestep S506 is a negation indicating that the content is being subjectedto a normal reproduction operation other than the All Song normalreproduction operation and the Repeat All normal reproduction operation,on the other hand, the flow of the processing goes on to a step S508 tocarry out a process of changing the present reproduction operation tothe Repeat Shuffle Folder reproduction operation. The process carriedout at the step S508 is similar to the process carried out at the stepS507 except that, in the process carried out at the step S508, musicalcontents reproduced in the shuffle reproduction mode are musicalcontents pertaining to a specified folder in place of all the musicalcontents stored in advance in the content storage unit 4. To put itconcretely, at the step S508, first of all, the reproduction processingunit 5 is controlled to switch the operation to select a musical contentto be reproduced from an operation carried out so far as an operationbased on a reproduction list to a random-selection operation. In thiscase, the reproduction list covers musical contents pertaining to thespecified folder as contents to be reproduced. Then, the reproductionprocessing unit 5 is controlled to change its setting so as to start theshuffle reproduction mode in which musical contents are reproducedthereafter in the Repeat Shuffle Folder reproduction operation.

If the determination result produced in the process carried out at thestep S502 is a negation indicating that the present reproduction mode isnot the shuffle reproduction mode, on the other hand, the flow of theprocessing goes on to a step S509 at which the reproduction operation isstopped temporarily in the same way as the process carried out at thestep S504. Then, at the next step S510, a process to output a soundeffect is carried out in the same way as the process carried out at thestep S505.

After the processes to temporarily stop the shuffle reproductionoperation and output a sound effect are completed, the flow of theprocessing goes on to a step S511 to carry out first of all a process ofproducing a result of determination as to whether or not the content isbeing subjected to the Repeat Shuffle All reproduction operation. If thedetermination result produced in the process carried out at the stepS511 is an affirmation indicating that the content is indeed beingsubjected to the Repeat Shuffle All normal reproduction operation, theflow of the processing goes on to a step S512 to carry out a process ofchanging the present shuffle reproduction operation to the Repeat Allnormal reproduction operation. As described earlier, in the embodiment,when the present reproduction mode is changed from the shufflereproduction mode to the normal reproduction mode, the reproduction of amusical content being reproduced is continued. Thus, in the processcarried out at the step S512, first of all, the reproduction processingunit 5 is controlled to end the temporary suspension state set in theprocess carried out at the step S509 as the state of the musical contentbeing reproduced and resume the reproduction of the musical content as acontinuation of the temporarily stopped reproduction. Then, thereproduction processing unit 5 is controlled to change its setting so asto start the normal reproduction mode in which musical contents arereproduced thereafter in the Repeat All normal reproduction operation.

If the determination result produced in the process carried out at thestep S511 is a negation indicating that the content is not beingsubjected to the Repeat Shuffle All reproduction operation, on the otherhand, the flow of the processing goes on to a step S513 to carry out aprocess of changing the present reproduction operation to the RepeatFolder normal reproduction operation. The process carried out at thestep S513 is similar to the process carried out at the step S512 exceptthat, in the process carried out at the step S513, musical contentsreproduced in the normal reproduction mode is musical contentspertaining to a specified folder in place of all the musical contentsstored in advance in the content storage unit 4. To put it concretely,at the step S513, first of all, the reproduction processing unit 5 iscontrolled to end the temporary suspension state set in the processcarried out at the step S509 as the state of the musical content beingreproduced and resume the reproduction of the musical content as acontinuation of the temporarily stopped reproduction. Then, thereproduction processing unit 5 is controlled to change its setting so asto start the normal reproduction mode in which musical contents arereproduced thereafter in the Repeat Folder normal reproductionoperation.

[Modified Version]

A modified version of the embodiment is explained by referring to FIGS.17 to 19 as follows. In the case of the modified version, the operationto detect a shake operation as described earlier is improved. To put itconcretely, the present value of the evaluation signal J is comparedwith a value immediately preceding the present value and, if thedifference between the present value and the immediately preceding valueis at least equal to a value determined in advance, the present valueand/or the immediately preceding value are regarded as values obtainedas a result of incorrect detection of the acceleration and, accordingly,the waveform of a mountain including the present value and theimmediately preceding value is excluded from processes to determinemountain validity.

FIG. 17 is an explanatory diagram to be referred to in description ofoperations carried out in accordance with a modified version of theembodiment. Let us assume that, as shown by notation <1> in the figure,the difference between a newly computed value of the evaluation signal Jand a value computed with the immediately preceding timing as a value ofthe evaluation signal J is at least equal to the value determined inadvance. Detecting such a large difference, a present-mountaininvalidity flag is set at 1 as shown by notation <2>. Thepresent-mountain invalidity flag is a flag, the value of which is to berecognized with each 0-cross timing. If the present-mountain invalidityflag is recognized with a 0-cross timing as a flag having a value of 1,the mountain having a waveform appearing during a 0-cross intervalpreceding the 0-cross timing is invalidated.

Thus, in the case of the modified version, with every 0-cross timing,the value of the present-mountain invalidity flag is recognized and, ifthe value of the present-mountain invalidity flag is 1, the peak valueof the mountain having a waveform appearing during a 0-cross intervalpreceding the 0-cross timing and the timing of the peak value areinvalidated as shown by notation <3>.

Let us assume that the difference between a newly computed value of theevaluation signal J and a value computed with the immediately precedingtiming as a value of the evaluation signal J is undesirably at leastequal to the value determined in advance. By making use of thepresent-mountain invalidity flag, the mountain having a waveformappearing during a 0-cross interval preceding the 0-cross timing can beexcluded from the processes to determine mountain validity as describedabove. That is to say, a mountain including incorrectly computed valuesof the evaluation signal J can be prevented from affecting the value ofthe shake count. Thus, a shake operation can be effectively preventedfrom being detected mistakenly.

FIG. 18 shows a flowchart exhibiting the flow of processing carried outto set the present-mountain invalidity flag described above as aparticular part of processing to detect a shake operation in accordancewith the modified version of the embodiment and FIG. 19 shows aflowchart exhibiting the flow of processing carried out to produce adetermination result on the basis of the present-mountain invalidityflag as a particular part of processing to detect a shake operation inaccordance with the modified version of the embodiment. It is to benoted that the processing represented by the flowcharts shown in thesefigures as processing to detect a shake operation is carried out on thebasis of a shake-operation detection program 3 a stored in thenonvolatile memory unit 3 as a program to be executed by the CPUemployed in the control unit 2. That is to say, in the case of themodified version, the shake-operation detection program 3 a has a newadditional portion represented by the flowchart shown in FIG. 18 andanother new additional portion represented by a part enclosed by adashed line in the flowchart shown in FIG. 19.

First of all, the processing to control the present-mountain invalidityflag in accordance with the modified version is explained by referringto the flowchart shown in FIG. 18. As shown in the figure, the flowchartbegins with a step S601 at which the difference between the presentvalue of the evaluation signal J and an evaluation-signal valueimmediately preceding the present value is computed. The process of thestep is carried out for every sampling time. The present value of theevaluation signal J is a value computed with the present sampling timingwhereas the evaluation-signal value immediately preceding the presentvalue is a value computed with a sampling timing immediately precedingthe present sampling timing.

Then, at the next step S602, the present value of the evaluation signalJ is compared with the immediately preceding value in order to produce aresult of determination as to whether or not the difference between thepresent value and the immediately preceding value has a value at leastequal to a value determined in advance. If the determination resultproduced in the process carried out at the step S602 is a negationindicating that the difference between the present value and theimmediately preceding value has a value smaller than the valuedetermined in advance, the flow of program execution returns to thecalling program as shown in the figure. If the determination resultproduced in the process carried out at the step S602 is an affirmationindicating that the difference between the present value and theimmediately preceding value indeed has a value at least equal to thevalue determined in advance, on the other hand, the flow of theprocessing goes on to a step S603 at which the present-mountaininvalidity flag is set at 1.

The processing to detect a shake operation in accordance with themodified version is explained by referring to the flowchart shown inFIG. 19. The processing to detect a shake operation in accordance withthe modified version includes a process to produce a result ofdetermination as to whether or not the present-mountain invalidity flaghas been set. As shown in the figure, in the processing to detect ashake operation by carrying out a process to produce a result ofdetermination as to whether or not the present-mountain invalidity flaghas been set in accordance with the modified version, processes enclosedby a dashed line are newly inserted into the processing represented bythe flowchart shown in FIG. 15 as processing to detect a shakeoperation. The newly inserted processes are processes carried out atsteps S701, S702 and S703. That is to say, as the determination resultproduced in the process carried out at the step S401 becomes anaffirmation indicating that the two consecutive values of the evaluationsignal J indeed have polarities opposite to each other, the flow of theprocessing goes on to the step S701 inserted in front of the step S402as shown in the figure. At the step S701, the present-mountaininvalidity flag is examined in order to carry out a process of producinga result of determination as to whether or not the present-mountaininvalidity flag has been reset to 0. If the determination resultproduced in the process carried out at the step S701 is an affirmationindicating that the present-mountain invalidity flag has been indeedreset to 0, as shown in the figure, the flow of the processing goes onto the step S402 to carry out a process of producing a result ofdetermination as to whether or not the 0-cross interval count has avalue in a range determined in advance. This is because, with thepresent-mountain invalidity flag reset to 0, it is not speciallynecessary to carry out an invalidation process caused by a largedifference between the present value of the evaluation signal J and avalue immediately preceding the present value.

If the determination result produced in the process carried out at thestep S701 is a negation indicating that the present-mountain invalidityflag is not 0, that is, a negation indicating that the present-mountaininvalidity flag is 1, on the other hand, the flow of the processing goeson to the step S702 to carry out a process to invalidate the presentpeak value and the timing of the present peak value. Then, at the nextstep S703, the present-mountain invalidity flag is reset to 0 before theflow of the processing goes back to the step S401.

[Other Modified Versions]

An embodiment of the present invention and a modified version of theembodiment have been described. However, the scope of the presentinvention is by no means limited to the embodiment and the modifiedversion. For example, even though the embodiment detects a shakeoperation on the basis of acceleration signals in the directions of thetwo axes Y and Z, a shake operation can also be detected on the basis ofan acceleration signal in the direction of only one axis determined inadvance. As an alternative, a shake operation can also be detected onthe basis of acceleration signals in the directions of three or moreaxes determined in advance. If a shake operation is detected on thebasis of an acceleration signal in the direction of only one axisdetermined in advance, for example, the evaluation signal J used fordetecting the shake operation is not obtained by subtracting an averagefrom the sum of the absolute values of values obtained by samplingacceleration signals in the directions of all axes for the presentsampling timing. In this case, the average is the average of such sumsobtained in the past period determined in advance. Instead, theevaluation signal J used for detecting the shake operation is obtainedby subtracting an average from the absolute value of a value obtained bysampling the acceleration signal in the direction of the axis determinedin advance for the present sampling timing. In this case, the average isthe average of such sums obtained in the past period determined inadvance. If a shake operation is detected on the basis of anacceleration signal in the direction of only one axis determined inadvance, however, it is desirable to limit the shaking direction of theshake operation to be detected to one direction only. If a shakeoperation is detected on the basis of acceleration signals in thedirections of three or more axes determined in advance, the evaluationsignal J used for detecting the shake operation is obtained bysubtracting an average from the sum of the absolute values of valuesobtained by sampling the acceleration signals in the directions of allthe axes for the present sampling timing. In this case, the average isthe average of such sums obtained in the past period determined inadvance. In this way, the same effect can be obtained. If a shakeoperation is detected on the basis of acceleration signals in thedirections of three or more axes determined in advance, the shakingdirection of the shake operation to be detected can be selectedarbitrarily.

As described above, in the case of the embodiment, the evaluation signalJ used for detecting a shake operation is obtained by subtracting anaverage from the sum of the absolute values of values obtained bysampling the acceleration signals in the directions of all the axes forthe present sampling timing. In this case, the average is the average ofsuch sums obtained in the past period determined in advance. If a shakeoperation is detected on the basis of an acceleration signal in thedirection of one axis determined in advance, the sum used in calculationof the evaluation signal J is replaced with the absolute value of avalue obtained by sampling the acceleration signal in the direction ofthe axis determined in advance for the present sampling timing. It is tobe noted, however, that any other evaluation signal can be used fordetecting a shake operation as far as the evaluation signal representsat least the amplitude and polarity of the acceleration. In this case,the polarity of the acceleration is a positive or negative polarity.

In addition, in the case of the embodiment, the condition forincrementing the value of the shake count by 1 demands that twoconsecutive positive and negative peak values shall alternate and thatthe difference in timing between the two consecutive peak values shallhave a value within a range determined in advance. However, it ispossible to provide a configuration in which the condition forincrementing the value of the shake count by 1 imposes morerequirements. For example, the condition for incrementing the value ofthe shake count by 1 may demand that a still-state period with a lengthdetermined in advance shall have existed prior to the shake operation.That is to say, since a still-state period with a length determined inadvance always exists immediately before the shake operation as demandedby the additional requirement, by making use of this additionalrequirement as an additional condition, it is possible to prevent ashake operation from being detected mistakenly. To put it concretely,values observed in a predetermined period in the past as values ofacceleration signals in the directions of axes are used to produce aresult of determination as to whether or not a continuous still-stateperiod with at least a length determined in advance has existedimmediately before the shake operation. Then, the value of the shakecount is incremented by 1 only on condition that a continuousstill-state period with at least a length determined in advance hasexisted immediately before the shake operation in addition to the factthat two consecutive positive and negative peak values alternate andthat the difference in timing between the two consecutive peak valueshas a value within a range determined in advance. In addition, thecondition related to such a continuous still-state period can be appliedas a condition for whole detection of a shake operation instead of beingapplied as a condition for incrementing the value of a shake count by 1.That is to say, only if a continuous still-state period with at least alength determined in advance has existed immediately before a shakeoperation, are a variety of conditions for detection of a shakeoperation tested in accordance with the flowchart shown in FIG. 15. Inother words, if a continuous still-state period with at least a lengthdetermined in advance did not exist immediately before a shakeoperation, the conditions shown in the flowchart of FIG. 15 are nottested.

In addition, it is also possible to provide a configuration in which thevalue of the shake count is incremented by 1 if the posture of theportable electronic apparatus prior to a shake operation satisfies acondition determined in advance. For example, the condition determinedin advance demands that the orientation of the portable electronicapparatus prior to a shake operation shall be within an angular rangedetermined in advance. In accordance with an apparatus property relatedto the shake operation to shake the portable electronic apparatuscarried by a hand, the posture of the portable electronic apparatusprior to the shake operation satisfies a condition requiring that theangle formed by the vertical center line of the apparatus in conjunctionwith the gravitational-direction line shall have a value within apredetermined angular range not exceeding a value to a certain degree.By applying the condition requiring that the angle formed by thevertical center line of the apparatus in conjunction with thegravitational-direction line shall have a value within a predeterminedangular range, the shake operation can be effectively prevented frombeing detected mistakenly. To put it concretely, in this case,information on an angle formed with respect to thegravitational-direction line as the postural angle of the portableelectronic apparatus prior to a shake operation is acquired on the basisof values obtained during the past period with a length determined inadvance as values of acceleration signals generated for a variety ofaxes and, the value of the shake count is incremented by 1 only oncondition that the postural angle has a value within the angular rangedetermined in advance in addition to the fact that two consecutivepositive and negative peak values alternate and that the difference intiming between the two consecutive peak values has a value within arange determined in advance. In addition, the condition related to theposture of the portable electronic apparatus prior to a shake operationcan be applied as a condition for whole detection of a shake operationinstead of being applied as a condition for incrementing the value of ashake count by 1. That is to say, only if the postural angle of theportable electronic apparatus prior to a shake operation has a valuewithin the angular range determined in advance, are a variety ofconditions for detection of a shake operation tested in accordance withthe flowchart shown in FIG. 15. In other words, if the postural angle ofthe portable electronic apparatus prior to a shake operation has a valuenot within the angular range determined in advance, the conditions shownin the flowchart of FIG. 15 are not tested.

In addition, in the case of the embodiment, a shake-on action is takenonly on condition that the shake count has reached a value determined inadvance. However, it is also possible to provide a configuration inwhich the condition for taking a shake-on action is changed. Forexample, instead of taking a shake-on action immediately after the shakecount has reached the value determined in advance, a shake standby stateis established when the shake count has reached a prescribed valueobtained by subtracting a certain value from the value determined inadvance. As an example, the certain value is 1. That is to say, a shakestandby state is established when the shake count has reached aprescribed value of 5 obtained by subtracting the certain value of 1from the predetermined value of 6. Then, after a shake standby state hasbeen established, on the basis of a condition different from thecondition requiring that the shake count shall have reached the valuedetermined in advance, it is possible to produce a result of finaldetermination as to whether or not a shake operation has been carriedout. The shake standby state is a deferment state existing during aperiod with a length determined in advance. In the shake standby state,the mountain-related condition of the step S402 of the flowchart shownin FIG. 15 and the mountain-couple related condition of the step S405 ofthe same flowchart are exempted. As described earlier, the condition ofthe step S402 is a condition requiring that the 0-cross interval countshall have a value in a range determined in advance whereas thecondition of the step S405 is a condition requiring that the positiveand negative peak values of two successive mountains shall alternate.That is to say, the value of the shake count is incremented by 1 if onlytwo conditions are satisfied. The first one of the two conditions is themountain-related condition of the step S403 of the flowchart shown inFIG. 15 whereas the second one of the two conditions is themountain-couple-related condition of the step S406 of the sameflowchart. As described earlier, the mountain-related condition of thestep S403 is a condition requiring that the peak value of an observedmountain shall be in a range determined in advance whereas themountain-couple-related condition of the step S406 is a conditionrequiring that the difference in timing between two successive peakvalues shall have a value in a range determined in advance. Then, at theend of the shake standby state, a shake-on action is eventually taken ifthe shake count has a value within a range between the prescribed valueobtained by subtracting the certain value from the value determined inadvance and another value determined in advance. To put it concretely,at the end of the shake standby state, a shake-on action is eventuallytaken if the shake count has a value within a range between theprescribed value of 5 (=6−1) and the other predetermined value oftypically 8. By changing the condition for taking a shake-on action asdescribed above, a shake operation can be detected in a stable mannereven if the definition of the shake operation varies individually fromuser to user.

In addition, in the case of the embodiment, the operation to detect ashake operation is processing based on software executed by the controlunit 2. However, it is also possible to provide a configuration in whichall or some of the processing to detect a shake operation is carried outby making use of hardware. For example, values of the evaluation signalare computed by making use of dedicated hardware.

On top of that, in the case of the embodiment, the operation to detect ashake operation is processing based on the shake-operation detectionprogram 3 a whereas the control operation following the detection of ashake operation is processing based on the control program 3 b, which isexecuted separately from the execution of the shake-operation detectionprogram 3 a. However, it is possible to provide a software configurationin which the control program 3 b and the shake-operation detectionprogram 3 a can be combined into a program or split into three or moreprograms to be executed separately from each other.

In addition, in the case of the embodiment, when the reproduction modeis switched from the normal reproduction mode to the shufflereproduction mode or vice versa, a sound effect is output. However, itis not always necessary to output a sound effect. In place of a soundeffect, for example, a predetermined string of characters or a figuredetermined in advance is displayed on the display screen unit 10A inorder to notify the user that the reproduction mode has been switchedfrom the normal reproduction mode to the shuffle reproduction mode orvice versa. As an alternative, a sound effect is output and apredetermined string of characters or a figure determined in advance isdisplayed on the display screen unit 10A. Anyway, techniques fornotifying the user that the reproduction mode has been switched from thenormal reproduction mode to the shuffle reproduction mode or vice versashould by no means be limited to the techniques based on a sound effectand such displays.

On top of that, in the case of the embodiment, upon detection of a shakeoperation, control is executed to switch the reproduction mode from thenormal reproduction mode to the shuffle reproduction mode or vice versaas follow-up control of the detection of a shake operation. However, thecontrol executed upon detection of a shake operation is by no meanslimited to the control to switch the reproduction mode from the normalreproduction mode to the shuffle reproduction mode or vice versa. Thatis to say, upon detection of a shake operation, any control can beexecuted to carry out an operation determined in advance as follow-upcontrol of the detection of a shake operation.

In addition, in the case of the embodiment, as processing to detect ashake operation, the portable electronic apparatus concurrently carriesout various kinds of processing such as the processing to compute valuesof the evaluation signal in accordance with the flowchart shown in FIG.12, the processing to obtain the valued of a 0-cross interval count inaccordance with the flowchart shown in FIG. 13, the processing to obtainpeak values and timings of the peak values in accordance with theflowchart shown in FIG. 14 as well as the processing to detect a shakeoperation by making use the acquired values and information on theacquired timings in accordance with the flowchart shown in FIG. 15.However, it is also possible to provide a configuration in which some orall of these pieces processing is carried out as sequential processing.

On top of that, in the case of the embodiment, the acceleration sensor12 is turned on while a content is being reproduced. However, it is alsopossible to provide a configuration in which the acceleration sensor 12is kept in a turned-on state during a period other than reproduction ofa content. For example, the acceleration sensor 12 can also be turned onin a sleep state. In the case of the embodiment, upon detection of ashake operation, control related to the reproduction function isexecuted to switch the reproduction mode from the normal reproductionmode to the shuffle reproduction mode or vice versa as follow-up controlof the detection of a shake operation. Thus, by keeping the accelerationsensor 12 in a turning-on state only while a content is beingreproduced, it is possible to execute follow-up control of detection ofa shake operation as well as reduce the power consumption. Let us assumefor example that the portable electronic apparatus also has a functionto receive radio broadcasts as a typical function other than thefunction to reproduce contents stored in advance in the content storageunit 4. In this case, the portable electronic apparatus turns on theacceleration sensor 12 during execution of the other function. In thisway, it is possible to execute proper follow-up control of detection ofa shake operation as well as reduce the power consumption.

In addition, if the acceleration sensor 12 is used for two or morepurposes such as the purpose of detecting a shake operation and apassometer purpose, for example, it is possible to provide aconfiguration in which the acceleration sensor 12 is switched from onestate to another among the following three states: (1) a state of beingturned on all the time, (2) a state of being turned on only during aprocess to reproduce a content or a process to receive a broadcastedsignal and (3) a state of being turned off all the time. When theacceleration sensor 12 is put in state (1), for example, the passometerfunction can be executed provided that the user has not set the portableelectronic apparatus to carry out a process to reproduce a content or aprocess to receive a broadcasted signal. When neither the passometerfunction nor the shake-operation detection function is being executed,the acceleration sensor 12 is put in state (3) in order to reduce thepower consumption.

On top of that, the embodiment implements the portable content playerprovided by the present invention. However, the present invention can beapplied suitably to a wide range of portable electronic apparatus.

In addition, it should be understood by those skilled in the art that avariety of modifications, combinations, sub-combinations and alterationsmay occur in dependence on design requirements and other factors insofaras they are within the scope of the appended claims or the equivalentsthereof.

1. A portable electronic apparatus comprising: a content storage unitconfigured to store content data; a display unit configured to display ascreen showing at least a title of a content data stored in the contentstorage unit; an acceleration detection unit configured to detect anacceleration from a movement of the whole said portable electronicapparatus, the acceleration unit configured to detect the accelerationon the basis of detecting a movement of the portable electronicapparatus in a direction perpendicular to the screen and a movement ofthe portable electronic apparatus in a direction parallel to the screen;an evaluation-signal generation unit configured to perform apredetermined process based on said acceleration detected by saidacceleration detection unit in order to generate an evaluation signalrepresenting an amplitude and positive or negative polarity of saidacceleration; and a control unit configured to produce a result ofdetermination as to whether said portable electronic apparatus has beendriven to make a predetermined movement on the basis of a vacillatingacceleration force indicated by said evaluation signal, and perform apredetermined operation on the basis of said result of determination,wherein said evaluation-signal generation unit generates said evaluationsignal by: computing at least one present absolute value of anacceleration value detected by said acceleration detection unit at apresent point of time, computing previous absolute values ofacceleration values detected by said acceleration detection unit atrespective points of time during a predetermined period of timepreceding the present point of time, and finding an average of saidprevious absolute values, and subtracting said average from said atleast one present absolute value of the present acceleration in order togive a value of said evaluation signal at said present point of time. 2.A portable electronic apparatus comprising: a content storage unitconfigured to store content data; a display unit configured to display ascreen showing at least a title of a content data stored in the contentstorage unit; an acceleration detection unit configured to detect anacceleration from a movement of the whole said portable electronicapparatus, the acceleration unit configured to detect the accelerationon the basis of detecting a movement of the portable electronicapparatus in a direction perpendicular to the screen and a movement ofthe portable electronic apparatus in a direction parallel to the screen;an evaluation-signal generation unit configured to perform apredetermined process based on said acceleration detected by saidacceleration detection unit in order to generate an evaluation signalrepresenting an amplitude and positive or negative polarity of saidacceleration; and a control unit configured to produce a result ofdetermination as to whether said portable electronic apparatus has beendriven to make a predetermined movement on the basis of a vacillatingacceleration force indicated by said evaluation signal, and perform apredetermined operation on the basis of said result of determination,wherein said evaluation-signal generation unit generates said evaluationsignal by: computing a sum of absolute values of accelerations, eachabsolute value in the sum detected by said acceleration detection unitat the present point of time as an acceleration in a direction of one ofa plurality of axes; computing previous sums of absolute values ofacceleration values detected by said acceleration detection unit atrespective points of time during a predetermined period of timepreceding the present point of time, and finding an average of saidprevious sums; and subtracting said average of the previous sums fromsaid sum computed at said present point of time in order to give a valueof said evaluation signal at said present point of time.
 3. A portableelectronic apparatus comprising: a content storage unit configured tostore content data; a display unit configured to display a screenshowing at least a title of a content data stored in the content storageunit; an acceleration detection unit configured to detect anacceleration from a movement of the whole said portable electronicapparatus, the acceleration unit configured to detect the accelerationon the basis of detecting a movement of the portable electronicapparatus in a direction perpendicular to the screen and a movement ofthe portable electronic apparatus in a direction parallel to the screen;an evaluation-signal generation unit configured to perform apredetermined process based on said acceleration detected by saidacceleration detection unit in order to generate an evaluation signalrepresenting an amplitude and positive or negative polarity of saidacceleration; and a control unit configured to produce a result ofdetermination as to whether said portable electronic apparatus has beendriven to make a predetermined movement on the basis of a vacillatingacceleration force indicated by said evaluation signal, and perform apredetermined operation on the basis of said result of determination,wherein said control unit is configured to perform: a 0-cross intervalmeasurement process to measure a 0-cross interval between twoconsecutive 0 crosses of said evaluation signal; a peak-value detectionprocess to detect a peak value appearing between said 0 crosses; apeak-value timing detection process to detect the timing of detection ofsaid peak value; a first determination process that produces anaffirmation result if 0-cross intervals measured in said 0-crossinterval measurement process have values within a 0-cross interval rangedetermined in advance; a second determination process that produces anaffirmation result if peak values detected in said peak-value detectionprocess during said 0-cross interval are within peak-value rangesdetermined in advance; a third determination process that produces anaffirmation result if a shake count has a value at least equal to 1; afourth determination process that produces an affirmation result if thepolarity of the peak value is opposite to the polarity of the precedingpeak value; a fifth determination process that produces an affirmationresult if a difference in timing between the peak value and thepreceding peak values has a value within a timing range determined inadvance; a shake-count value setting process to set said value of saidshake count at 1 if said determination results produced in said firstand second determination processes are both an affirmation resultwhereas said determination result produced in said third determinationprocess is not an affirmation result; a first shake-count valueincrementing process to increment said value of said shake count by 1 ifsaid determination results produced in all of said first to fifthdetermination processes are each an affirmation result; a sixthdetermination process that produces an affirmation result if said valueof said shake count has become equal to a prescribed value determined inadvance; a seventh determination process that produces an affirmationresult if an operation detection standby state has been continuing for apredetermined period of time if said determination result produced insaid sixth determination process is an affirmation result; a secondshake-count value incrementing process to increment said value of saidshake count by 1 after an affirmation result is produced by said sixthdetermination process if said determination results produced in saidsecond and fifth determination processes are each an affirmation result;and a determination process to determine that a shake operation has beencarried out at a point of time an affirmation result is produced by saidseventh determination process if said shake count reaches a value in arange between said prescribed value used as a lower limit and apredetermined upper limit.
 4. A signal generation apparatus configuredto generate an evaluation signal, said signal generation apparatuscomprising: a content storage unit configured to store content data; adisplay unit configured to display a screen showing at least a title ofa content data stored in the content storage unit; an accelerationdetection unit configured to detect an acceleration from a movement ofthe whole said portable electronic apparatus, the acceleration unitconfigured to detect the acceleration on the basis of detecting amovement of the portable electronic apparatus in a directionperpendicular to the screen and a movement of the portable electronicapparatus in a direction parallel to the screen; an evaluation-signalgeneration unit configured to compute at least one present absolutevalue of an acceleration value at a present point of time which isdetected by an acceleration detection unit configured to detect anacceleration, compute previous absolute values of acceleration valuesdetected by said acceleration detection unit at respective points oftime during a predetermined period of time preceding the present pointof time, and finding an average of said previous absolute values, andsubtract said average from said at least one present absolute value ofthe present acceleration in order to give a value of said evaluationsignal at said present point of time.
 5. A signal generation method forgenerating an evaluation signal on a portable electronic apparatuscomprising the steps of: storing content data on a content storage unitof the portable electronic apparatus; displaying a screen on a displayunit of the portable electronic apparatus showing at least a title of acontent data stored in the content storage unit; detecting anacceleration of said portable electronic apparatus from a movement ofthe whole said portable electronic apparatus on the basis of detecting amovement of the portable electronic apparatus in a directionperpendicular to the screen and a movement of the portable electronicapparatus in a direction parallel to the screen; computing, on anevaluation signal generation unit, at least one present absolute valueof an acceleration value at a present point of time which is detected byan acceleration detection unit configured to detect the acceleration,computing, on the evaluation signal generation unit, previous absolutevalues of acceleration values detected by said acceleration detectionunit at respective points of time during a predetermined period of timepreceding the present point of time, and finding an average of saidprevious absolute values, and subtracting, on the evaluation signalgeneration unit, said average from said at least one present absolutevalue of the present acceleration in order to give a value of saidevaluation signal at said present point of time.